Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ff7e128c
Commit
ff7e128c
authored
Dec 19, 2016
by
Luke Edwards
Committed by
Guillermo Rauch
Dec 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add cli version flags (#435)
* add version flags * fix typo -.-
parent
fce87e6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
next
bin/next
+6
-0
No files found.
bin/next
View file @
ff7e128c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment