🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
559 B

7 years ago
#!/usr/bin/env node
'use strict';
7 years ago
require('colorful').colorful();
7 years ago
const program = require('commander');
const packageInfo = require('../../package.json');
7 years ago
program
.version(packageInfo.version)
.command('run [name]', 'run specified task')
.parse(process.argv);
7 years ago
// https://github.com/tj/commander.js/pull/260
const proc = program.runningCommand;
7 years ago
if (proc) {
proc.on('close', process.exit.bind(process));
7 years ago
proc.on('error', () => {
process.exit(1);
});
7 years ago
}
const subCmd = program.args[0];
7 years ago
if (!subCmd || subCmd !== 'run') {
program.help();
7 years ago
}