Skip to content

Commit 29a42a4

Browse files
committed
Add banner
1 parent 3fdcc97 commit 29a42a4

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

cli.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
22

33
const chalk = require('chalk');
4+
const figlet = require('figlet');
45
const envinfo = require('envinfo');
56
const { program } = require('commander');
67
const run = require('./lib/index').default;
@@ -10,17 +11,30 @@ const { log } = console;
1011

1112
let packageName;
1213

14+
log(
15+
figlet.textSync('KDCSoftware', {
16+
font: 'Standard',
17+
horizontalLayout: 'default',
18+
verticalLayout: 'default',
19+
})
20+
);
21+
1322
program
1423
.version(packageJson.version)
1524
.name(`npx ${packageJson.name}`)
1625
.usage(`${chalk.green('package-name')}`)
1726
.arguments('[package-name]')
1827
.option('--no-bundle', 'do not bundle the build output')
19-
.option('--git-origin <remote-url>', 'add git remote url as origin')
20-
.option('--info', 'print environment debug info')
28+
.option('-g, --git-origin <remote-url>', 'add git remote url as origin')
29+
.option('-i, --info', 'print environment debug info')
2130
.action((name) => {
2231
packageName = name;
2332
})
33+
.on('--help', () => {
34+
log('');
35+
log('Example:');
36+
log(` ${chalk.cyan(program.name())} ${chalk.green('my-awesome-package')}`);
37+
})
2438
.parse(process.argv);
2539

2640
const createPackage = async () => {

package-lock.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"commander": "^5.1.0",
4444
"envinfo": "^7.5.1",
4545
"execa": "^4.0.1",
46+
"figlet": "^1.4.0",
4647
"fs-extra": "^9.0.0"
4748
},
4849
"devDependencies": {

0 commit comments

Comments
 (0)