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
71296cce
Commit
71296cce
authored
May 09, 2017
by
Arunoda Susiripala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the verbose mode.
parent
311e4ca0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
next-export
bin/next-export
+7
-3
export.js
server/export.js
+5
-1
No files found.
bin/next-export
View file @
71296cce
...
...
@@ -9,9 +9,13 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const
argv
=
parseArgs
(
process
.
argv
.
slice
(
2
),
{
alias
:
{
h
:
'help'
h
:
'help'
,
v
:
'verbose'
},
boolean
:
[
'h'
]
boolean
:
[
'h'
],
default
:
{
v
:
false
}
})
if
(
argv
.
help
)
{
...
...
@@ -44,7 +48,7 @@ if (!existsSync(join(dir, 'pages'))) {
printAndExit
(
'> Couldn
\'
t find a `pages` directory. Please create one under the project root'
)
}
exportApp
(
dir
)
exportApp
(
dir
,
{
verbose
:
argv
.
verbose
}
)
.
catch
((
err
)
=>
{
console
.
error
(
err
)
process
.
exit
(
1
)
...
...
server/export.js
View file @
71296cce
...
...
@@ -7,7 +7,7 @@ import getConfig from './config'
import
{
renderToHTML
}
from
'./render'
import
{
printAndExit
}
from
'../lib/utils'
export
default
async
function
(
dir
)
{
export
default
async
function
(
dir
,
options
)
{
dir
=
resolve
(
dir
)
const
outDir
=
join
(
dir
,
'.out'
)
const
nextDir
=
join
(
dir
,
'.next'
)
...
...
@@ -66,6 +66,10 @@ export default async function (dir) {
}
for
(
const
path
of
exportPaths
)
{
if
(
options
.
verbose
)
{
console
.
log
(
` exporing path:
${
path
}
`
)
}
const
{
page
,
query
}
=
exportPathMap
[
path
]
const
req
=
{
url
:
path
}
const
res
=
{}
...
...
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