File tree 6 files changed +9
-24
lines changed
node-tests/unit/frameworks/vue/tasks
6 files changed +9
-24
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ module.exports = Command.extend({
90
90
return cordovaTarget . build ( ) ;
91
91
}
92
92
} )
93
- . then ( hook . prepare ( 'afterBuild' , options ) )
93
+ . then ( ( ) => hook . run ( 'afterBuild' , options ) )
94
94
. then ( ( ) => lint . run ( ) )
95
95
. then ( function ( ) {
96
96
logger . success ( 'ember-cordova project built' ) ;
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ module.exports = Command.extend({
25
25
} ) ;
26
26
27
27
return hook . run ( 'beforePrepare' , options )
28
- . then ( prepare . prepare ( ) )
29
- . then ( hook . prepare ( 'afterPrepare' , options ) )
28
+ . then ( ( ) => prepare . run ( ) )
29
+ . then ( ( ) => hook . run ( 'afterPrepare' , options ) )
30
30
. catch ( function ( err ) {
31
31
logger . error ( err ) ;
32
32
} ) ;
Original file line number Diff line number Diff line change @@ -78,14 +78,14 @@ module.exports = Command.extend({
78
78
return editXml . addNavigation ( project , reloadUrl )
79
79
. then ( ( ) => cordovaTarget . validateServe ( ) )
80
80
. then ( ( ) => framework . validateServe ( opts ) )
81
- . then ( hook . prepare ( 'beforeBuild' , opts ) )
82
- . then ( setupLivereload . prepare ( reloadUrl ) )
81
+ . then ( ( ) => hook . run ( 'beforeBuild' , opts ) )
82
+ . then ( ( ) => setupLivereload . run ( reloadUrl ) )
83
83
. then ( function ( ) {
84
84
if ( opts . skipCordovaBuild !== true ) {
85
85
return cordovaTarget . build ( ) ;
86
86
}
87
87
} )
88
- . then ( hook . prepare ( 'afterBuild' , opts ) )
88
+ . then ( ( ) => hook . run ( 'afterBuild' , opts ) )
89
89
. then ( function ( ) {
90
90
if ( opts . skipFrameworkBuild !== true ) {
91
91
return framework . serve ( opts , ui ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ module.exports = Task.extend({
19
19
command : `cp -R ${ this . buildPath } /* ${ this . cordovaOutputPath } `
20
20
} ) ;
21
21
22
- return build . run ( )
23
- . then ( copy . prepare ( ) ) ;
22
+ return build . run ( ) . then ( ( ) => copy . run ( ) ) ;
24
23
}
25
24
} ) ;
Original file line number Diff line number Diff line change 1
1
const Task = require ( 'ember-cli/lib/models/task' ) ;
2
2
3
- module . exports = Task . extend ( {
4
- prepare ( ) {
5
- let task = this ;
6
- let args = Array . prototype . slice . call ( arguments ) ;
7
-
8
- return function preparedTask ( ) {
9
- return task . run . apply ( task , args ) ;
10
- } ;
11
- }
12
- } ) ;
3
+ module . exports = Task . extend ( ) ;
Original file line number Diff line number Diff line change @@ -16,11 +16,6 @@ describe('Vue Build Task', function() {
16
16
return Promise . resolve ( ) ;
17
17
} ) ;
18
18
19
- td . replace ( Bash . prototype , 'prepare' , function ( ) {
20
- tasks . push ( 'bash-task-2' ) ;
21
- return Promise . resolve ( ) ;
22
- } ) ;
23
-
24
19
buildTask = new Build ( {
25
20
buildCommand : 'fakeBuildCommand' ,
26
21
buildPath : 'fakePath' ,
@@ -36,7 +31,7 @@ describe('Vue Build Task', function() {
36
31
return buildTask . run ( { cordovaOutputPath : 'fakePath' } ) . then ( function ( ) {
37
32
expect ( tasks ) . to . deep . equal ( [
38
33
'bash-task' ,
39
- 'bash-task-2 '
34
+ 'bash-task'
40
35
] ) ;
41
36
} ) ;
42
37
} ) ;
You can’t perform that action at this time.
0 commit comments