File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-env node */
2
2
'use strict' ;
3
3
4
- let path = require ( 'path' ) ;
5
- let Funnel = require ( 'broccoli-funnel' ) ;
6
- let MergeTrees = require ( 'broccoli-merge-trees' ) ;
4
+ const path = require ( 'path' ) ;
5
+ const Funnel = require ( 'broccoli-funnel' ) ;
6
+ const MergeTrees = require ( 'broccoli-merge-trees' ) ;
7
+ const map = require ( 'broccoli-stew' ) . map ;
7
8
8
9
module . exports = {
9
10
10
11
name : 'ember-gestures' ,
11
12
12
- included : function ( app ) {
13
+ included ( app ) {
13
14
this . _super . included . apply ( this , arguments ) ;
14
15
15
16
// see: https://github.com/ember-cli/ember-cli/issues/3718
16
17
if ( typeof app . import !== 'function' && app . app ) {
17
18
app = app . app ;
18
19
}
19
20
20
- if ( ! process . env . EMBER_CLI_FASTBOOT ) {
21
- app . import ( 'vendor/hammer.js' ) ;
22
- }
21
+
22
+ app . import ( 'vendor/hammer.js' ) ;
23
23
} ,
24
24
25
25
treeForVendor ( vendorTree ) {
26
26
let trees = [ ] ;
27
27
let hammerTree = new Funnel ( path . dirname ( require . resolve ( 'hammerjs' ) ) , {
28
28
files : [ 'hammer.js' ]
29
29
} ) ;
30
+ hammerTree = map ( hammerTree , ( content ) => `if (typeof FastBoot === 'undefined') { ${ content } }` ) ;
31
+
30
32
31
33
if ( vendorTree !== undefined ) {
32
34
trees . push ( vendorTree ) ;
@@ -37,7 +39,7 @@ module.exports = {
37
39
return new MergeTrees ( trees ) ;
38
40
} ,
39
41
40
- isDevelopingAddon : function ( ) {
42
+ isDevelopingAddon ( ) {
41
43
return false ;
42
44
}
43
45
You can’t perform that action at this time.
0 commit comments