File tree 2 files changed +11
-19
lines changed
packages/nativescript-vue-template-compiler
2 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ inquirer
31
31
} )
32
32
} )
33
33
. then ( version => {
34
- console . log ( `Releasing v${ version } ...` )
34
+ console . log ( blue ( `Releasing v${ version } ...` ) )
35
+ console . log ( blue ( '-' . repeat ( 80 ) ) )
35
36
36
- // build
37
37
const buildMessage = `build: ${ version } `
38
38
const releaseMessage = `release: ${ version } `
39
39
return runCommands ( `
@@ -56,31 +56,23 @@ inquirer
56
56
` )
57
57
} )
58
58
. then ( ( ) => {
59
+ console . log ( blue ( '-' . repeat ( 80 ) ) )
59
60
console . log ( blue ( 'Release complete.' ) )
60
61
} )
61
62
. catch ( err => {
63
+ console . log ( blue ( '-' . repeat ( 80 ) ) )
64
+ console . log ( err )
65
+ console . log ( blue ( '-' . repeat ( 80 ) ) )
62
66
console . log ( blue ( 'Release has been canceled.' ) )
63
67
} )
64
68
65
69
function runCommands ( commands ) {
66
- const promises = commands . split ( '\n' )
70
+ return commands . split ( '\n' )
67
71
. map ( c => c . trim ( ) )
68
72
. filter ( c => c . length )
69
- . map ( ( command ) => {
70
- return runCommand ( command . trim ( ) )
71
- } )
72
-
73
- return new Promise ( async ( resolve , reject ) => {
74
- try {
75
- const res = [ ]
76
- for ( let promise of promises ) {
77
- res . push ( await promise )
78
- }
79
- resolve ( res )
80
- } catch ( err ) {
81
- reject ( err )
82
- }
83
- } )
73
+ . reduce ( ( promise , command ) => {
74
+ return promise . then ( ( ) => runCommand ( command ) )
75
+ } , Promise . resolve ( ) )
84
76
}
85
77
86
78
function runCommand ( command ) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-vue-template-compiler" ,
3
- "version" : " 0.5.0 " ,
3
+ "version" : " 0.4.1 " ,
4
4
"description" : " template compiler for nativescript-vue" ,
5
5
"main" : " index.js" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments