Skip to content

Commit e1118d5

Browse files
committed
Update msg
1 parent f2943a1 commit e1118d5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/commands/init.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,17 @@ module.exports = function (path = '', local, theme, plugins) {
4040
return process.exit(0)
4141
}
4242

43-
createFile(cwdPath, local, theme, plugins)
44-
console.log(msg)
43+
createFile(cwdPath, local, theme, plugins, msg)
4544
})
4645
.catch(console.error)
4746

4847
return false
4948
}
5049

51-
createFile(cwdPath, local, theme, plugins)
52-
console.log(msg)
50+
createFile(cwdPath, local, theme, plugins, msg)
5351
}
5452

55-
function createFile(path, local, theme, plugins) {
53+
function createFile(path, local, theme, plugins, msg) {
5654
const target = file => resolve(path, file)
5755
const readme = exists(cwd('README.md')) || pwd('template/README.md')
5856
let main = pwd('template/index.html')
@@ -127,6 +125,7 @@ function createFile(path, local, theme, plugins) {
127125
}
128126
})
129127
prompt.on('cancel', () => replace(target(filename), '\n _plugins_', ''))
128+
prompt.on('close', () => console.log(msg))
130129
prompt.run()
131130
.then(answers => {
132131
replace(target(filename), ' _plugins_', '_plugin'.repeat(answers.length + 1))

0 commit comments

Comments
 (0)