2
2
'use strict' ;
3
3
4
4
var VersionChecker = require ( 'ember-cli-version-checker' ) ;
5
+ var funnel = require ( 'broccoli-funnel' )
5
6
6
7
// We support Ember-Data 1.13.x and 2.x. Checking for this is complicated
7
8
// because the effective version of ember-data is controlled by bower for
@@ -26,15 +27,31 @@ module.exports = {
26
27
} ,
27
28
28
29
included : function included ( app ) {
29
- var bowerDir = app . bowerDirectory ;
30
-
31
- app . import ( bowerDir + '/pouchdb/dist/pouchdb.js' ) ;
32
- app . import ( bowerDir + '/relational-pouch/dist/pouchdb.relational-pouch.js' ) ;
33
- app . import ( 'vendor/ember-pouch/shim.js' , {
34
- type : 'vendor' ,
35
- exports : {
36
- 'pouchdb' : [ 'default' ]
37
- }
38
- } ) ;
30
+ if ( isFastBoot ( ) ) {
31
+ app . import ( 'vendor/ember-pouch/ember-pouch-fastboot.js' ) ;
32
+ } else {
33
+ var bowerDir = app . bowerDirectory ;
34
+
35
+ app . import ( bowerDir + '/pouchdb/dist/pouchdb.js' ) ;
36
+ app . import ( bowerDir + '/relational-pouch/dist/pouchdb.relational-pouch.js' ) ;
37
+ app . import ( 'vendor/ember-pouch/shim.js' , {
38
+ type : 'vendor' ,
39
+ exports : {
40
+ 'pouchdb' : [ 'default' ]
41
+ }
42
+ } ) ;
43
+ }
39
44
}
40
45
} ;
46
+
47
+ // Steal *all the things* from github.com/tomdale/ember-network !
48
+
49
+ var path = require ( 'path' ) ;
50
+ var funnel = require ( 'broccoli-funnel' ) ;
51
+
52
+ // Checks to see whether this build is targeting FastBoot. Note that we cannot
53
+ // check this at boot time--the environment variable is only set once the build
54
+ // has started, which happens after this file is evaluated.
55
+ function isFastBoot ( ) {
56
+ return process . env . EMBER_CLI_FASTBOOT === 'true' ;
57
+ }
0 commit comments