mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-21 16:09:52 +00:00
Add [ddv](https://github.com/ddvjs/ddv) virtual host management worker support update pageage.json
26 lines
435 B
JavaScript
Executable File
26 lines
435 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var join = require('path').join
|
|
|
|
var defaultCommand = 'dev'
|
|
var commands = []
|
|
try {
|
|
commands = require('fs').readdirSync(__dirname)
|
|
} catch (e) {
|
|
commands = []
|
|
}
|
|
commands.push(defaultCommand, 'init')
|
|
commands = new Set(commands)
|
|
|
|
var cmd = process.argv[2]
|
|
|
|
if (commands.has('nuxt-' + cmd)) {
|
|
process.argv.splice(2, 1)
|
|
} else {
|
|
cmd = defaultCommand
|
|
}
|
|
|
|
var bin = join(__dirname, 'nuxt-' + cmd)
|
|
|
|
require(bin)
|