@@ -40,19 +40,17 @@ module.exports = function (path = '', local, theme, plugins) {
40
40
return process . exit ( 0 )
41
41
}
42
42
43
- createFile ( cwdPath , local , theme , plugins )
44
- console . log ( msg )
43
+ createFile ( cwdPath , local , theme , plugins , msg )
45
44
} )
46
45
. catch ( console . error )
47
46
48
47
return false
49
48
}
50
49
51
- createFile ( cwdPath , local , theme , plugins )
52
- console . log ( msg )
50
+ createFile ( cwdPath , local , theme , plugins , msg )
53
51
}
54
52
55
- function createFile ( path , local , theme , plugins ) {
53
+ function createFile ( path , local , theme , plugins , msg ) {
56
54
const target = file => resolve ( path , file )
57
55
const readme = exists ( cwd ( 'README.md' ) ) || pwd ( 'template/README.md' )
58
56
let main = pwd ( 'template/index.html' )
@@ -127,6 +125,7 @@ function createFile(path, local, theme, plugins) {
127
125
}
128
126
} )
129
127
prompt . on ( 'cancel' , ( ) => replace ( target ( filename ) , '\n _plugins_' , '' ) )
128
+ prompt . on ( 'close' , ( ) => console . log ( msg ) )
130
129
prompt . run ( )
131
130
. then ( answers => {
132
131
replace ( target ( filename ) , ' _plugins_' , '_plugin' . repeat ( answers . length + 1 ) )
0 commit comments