mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-04 19:37:18 +00:00
15 lines
345 B
JavaScript
15 lines
345 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)
|
|
}
|