create-component-template
Version:
Generates react components from templates
26 lines (23 loc) • 580 B
JavaScript
var yargs = require('yargs');
var argv = yargs.command(' ', 'Scaffolds a new component via user prompt unless cli args are specified. See --help for more details.').option({
config: {
alias: 'c',
describe: 'Path to a config file'
}
}).option({
name: {
alias: 'n',
describe: 'Name of the component'
}
}).option({
path: {
alias: 'p',
describe: 'Path to create the component at'
}
}).help().argv;
module.exports = {
configPath: argv.config || argv.c,
componentName: argv.name || argv.n,
componentPath: argv.path || argv.p
};
;