File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,15 @@ module.exports = class SkeletonApp {
13
13
}
14
14
15
15
build ( ) {
16
- return execa ( 'ember' , [ 'build' ] , { cwd : this . appDir } ) ;
16
+ return this . _ember ( [ 'build' ] ) ;
17
17
}
18
18
19
19
serve ( ) {
20
20
if ( this . _watched ) {
21
21
throw new Error ( 'Already serving' ) ;
22
22
}
23
23
24
- let ember = execa ( 'ember' , [ 'serve' ] , { cwd : this . appDir } ) ;
25
- return this . _watched = new WatchedBuild ( ember ) ;
24
+ return this . _watched = new WatchedBuild ( this . _ember ( [ 'serve' ] ) ) ;
26
25
}
27
26
28
27
writeFile ( path , contents ) {
@@ -42,9 +41,14 @@ module.exports = class SkeletonApp {
42
41
fs . removeSync ( this . appDir ) ;
43
42
} catch ( error ) {
44
43
// eslint-disable-next-line no-console
45
- console . warn ( `Error removing skeleton-app tmpdir ${ this . appDir } ` , error ) ;
44
+ console . warn ( `Warning: unable to remove skeleton-app tmpdir ${ this . appDir } ( ${ error . code } )` ) ;
46
45
}
47
46
}
47
+
48
+ _ember ( args ) {
49
+ let ember = require . resolve ( 'ember-cli/bin/ember' ) ;
50
+ return execa ( 'node' , [ ember ] . concat ( args ) , { cwd : this . appDir } ) ;
51
+ }
48
52
}
49
53
50
54
class WatchedBuild extends EventEmitter {
You can’t perform that action at this time.
0 commit comments