spaceout/front_end/node_modules/webpack-cli/lib/utils/commands.js
2020-12-12 10:25:30 -05:00

26 lines
557 B
JavaScript

const { commands } = require('./cli-flags');
const defaultCommands = {
init: 'init',
loader: 'generate-loader',
plugin: 'generate-plugin',
info: 'info',
migrate: 'migrate',
serve: 'serve',
};
// Contains an array of strings with commands and their aliases that the cli supports
const names = commands
.map(({ alias, name }) => {
if (alias) {
return [name, alias];
}
return [name];
})
.reduce((arr, val) => arr.concat(val), []);
module.exports = {
defaultCommands,
names,
};