mirror of
https://github.com/Rushilwiz/spaceout.git
synced 2025-04-22 04:19:49 -04:00
26 lines
557 B
JavaScript
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,
|
|
};
|