Nuxt/packages/cli/src/commands/index.js
pooya parsa e7cc2757c3 refactor: update eslint-config to 1.x
Co-authored-by: Alexander Lichter <manniL@gmx.net>
2019-07-10 15:15:49 +04:30

15 lines
346 B
JavaScript

const commands = {
start: () => import('./start'),
dev: () => import('./dev'),
build: () => import('./build'),
generate: () => import('./generate'),
help: () => import('./help')
}
export default function getCommand (name) {
if (!commands[name]) {
return Promise.resolve(null)
}
return commands[name]().then(m => m.default)
}