UNPKG

487 BJavaScriptView Raw
1#!/usr/bin/env node
2var commander = require('commander')
3var chalk = require('chalk');
4commander.usage('<page-name> [template-name]');
5
6commander.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
14function help () {
15 commander.parse(process.argv)
16 if (commander.args.length < 2) return commander.help()
17}
18help()
19