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.
ant-design-vue/antd-tools/cli/index.js

29 lines
594 B

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