Skip to content

Commit f670cb8

Browse files
author
zhengaojin
committed
feat: Adjust the order of the options
1 parent 86e4a1d commit f670cb8

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

bin/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/usr/bin/env node
22

33
const program = require('commander')
4-
const Download = require('../packages/Download')
4+
const download = require('../packages/Download')
55
const { version } = require('../package')
66

77
program
88
.version(version, '-v, --version')
99
.command('init <name>')
1010
.description('Set your project name')
1111
.action(function (dir, cmd) {
12-
Download(dir)
12+
download(dir)
1313
})
1414

1515
program.parse(process.argv)

lib/Inquirer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ const promptList = [{
99
]
1010
}, {
1111
type: 'list',
12-
message: 'Choose a state management library: ',
12+
message: 'Choose what you need: ',
1313
name: 'state',
1414
choices: [
15+
'electron',
1516
'redux',
1617
'mobx',
17-
'mobx-typescript',
18-
'electron'
18+
'mobx-typescript'
1919
]
2020
}]
2121

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rs-admin-cli",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"description": "Command line interface for react",
55
"author": "zhengaojin <zhengaojin@live.cn>",
66
"private": false,

packages/Download.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const download = require('download-git-repo')
2-
const chalk = require('chalk')
1+
const Download = require('download-git-repo')
2+
const Chalk = require('chalk')
33
const Spinner = require('../lib/Spinner')
44
const Banner = require('../lib/Banner')
55
const Div = require('../lib/Div')
@@ -13,7 +13,7 @@ const Download = async (dir) => {
1313
const answers = await Inquirer()
1414
process.stdout.write('\033c')
1515
Spinner.start()
16-
download(`github:Jines-z/rs-template-${answers.state}`, `${dir}/`, async function (err) {
16+
Download(`github:Jines-z/rs-template-${answers.state}`, `${dir}/`, async function (err) {
1717
if (!err) {
1818
Spinner.stop()
1919
console.log(`# Download completed! \n`)
@@ -25,11 +25,11 @@ const Download = async (dir) => {
2525
console.log('\n')
2626
console.log(`## Successfully created project ${dir}`)
2727
console.log(`## Get started with the following commands:\n`)
28-
console.log(` ${chalk.gray('$')} ${chalk.cyan(`cd ${dir}`)}`)
29-
console.log(` ${chalk.gray('$')} ${chalk.cyan(`npm start`)}\n`)
28+
console.log(` ${Chalk.gray('$')} ${Chalk.cyan(`cd ${dir}`)}`)
29+
console.log(` ${Chalk.gray('$')} ${Chalk.cyan(`npm start`)}\n`)
3030
} else {
3131
Spinner.stop()
32-
console.log(chalk.red('\n Download template failed ! \n'))
32+
console.log(Chalk.red('\n Download template failed ! \n'))
3333
process.exit(0)
3434
}
3535
})

0 commit comments

Comments
 (0)