mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +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)
|
|
}
|