Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit 8ff47ff

Browse files
committed
Refactor bin
1 parent ba159a1 commit 8ff47ff

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

bin/index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ var commands = {
5454

5555
var existCommand = Object.keys(commands).indexOf(command) > -1
5656

57-
if (existCommand) {
58-
return bumped.start(function (err) {
59-
if (err) throw err
60-
process.stdout.write('\n')
61-
return commands[command]()
62-
})
63-
}
57+
if (!existCommand) return cli.showHelp()
58+
59+
process.stdout.write('\n')
6460

65-
cli.showHelp()
61+
if (command === 'init') return commands[command]()
62+
63+
return bumped.start(function (err) {
64+
if (err) throw err
65+
return commands[command]()
66+
})

0 commit comments

Comments
 (0)