FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
razzle/scripts/try-example.js at master · javascriptit/razzle · GitHub
javascriptit
razzle
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
razzle
/
scripts
/
try-example.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (28 loc) · 681 Bytes
Breadcrumbs
razzle
/
scripts
/
try-example.js
Copy path
File metadata and controls
29 lines (28 loc) · 681 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const
yargs
=
require
(
'yargs'
)
;
const
execa
=
require
(
'execa'
)
;
const
fs
=
require
(
'fs-extra'
)
;
const
path
=
require
(
'path'
)
;
const
util
=
require
(
'../test/fixtures/util'
)
;
let
argv
=
yargs
.
usage
(
'$0 <example> <stage> [-c|--copy-only]'
)
.
command
(
{
command
:
'*'
,
builder
:
(
yargs
)
=>
{
return
yargs
.
option
(
'c'
,
{
alias
:
'copy-only'
,
describe
:
'only copy'
,
default
:
false
}
)
}
,
handler
:
argv
=>
{
const
exampleName
=
argv
.
_
[
0
]
;
const
stageName
=
argv
.
_
[
1
]
||
'example'
;
console
.
log
(
`Setting up
${
exampleName
}
with yalc as
${
stageName
}
`
)
util
.
yalcSetupStageWithExample
(
stageName
,
exampleName
)
;
}
}
)
.
help
(
)
.
argv
Back
|
FazBrowse Home
|
New Git URL