mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
parent
fce87e6e65
commit
ff7e128c80
6
bin/next
6
bin/next
|
@ -3,6 +3,7 @@
|
|||
import { join } from 'path'
|
||||
import { spawn } from 'cross-spawn'
|
||||
import { watchFile } from 'fs'
|
||||
import pkg from '../../package.json'
|
||||
|
||||
const defaultCommand = 'dev'
|
||||
const commands = new Set([
|
||||
|
@ -15,6 +16,11 @@ const commands = new Set([
|
|||
let cmd = process.argv[2]
|
||||
let args
|
||||
|
||||
if (new Set(['--version', '-v']).has(cmd)) {
|
||||
console.log(`next.js v${pkg.version}`)
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
if (new Set(['--help', '-h']).has(cmd)) {
|
||||
console.log(`
|
||||
Usage
|
||||
|
|
Loading…
Reference in a new issue