1 | #!/usr/bin/env node
|
2 | var commander = require('commander')
|
3 | var chalk = require('chalk');
|
4 | commander.usage('<page-name> [template-name]');
|
5 |
|
6 | commander.on('--help', function () {
|
7 | console.log(' Examples:')
|
8 | console.log()
|
9 | console.log(chalk.gray(' # create a new page with an official template'))
|
10 | console.log(' $ zaro new my-page my-template')
|
11 | console.log()
|
12 | })
|
13 |
|
14 | function help () {
|
15 | commander.parse(process.argv)
|
16 | if (commander.args.length < 2) return commander.help()
|
17 | }
|
18 | help()
|
19 |
|