create-next-app
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -68,2 +68,6 @@ /** | ||
) | ||
.option( | ||
'--example <example>', | ||
'example from https://github.com/zeit/next.js/tree/master/examples/ {example}' | ||
) | ||
.allowUnknownOption() | ||
@@ -128,9 +132,17 @@ .on('--help', () => { | ||
createApp( | ||
projectName, | ||
program.verbose, | ||
program.scriptsVersion, | ||
hiddenProgram.internalTestingTemplate | ||
); | ||
const nextExamplesBaseCommand = `mkdir -p ${projectName} | curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz -C ${projectName} --strip=3 next.js-master/examples/`; | ||
if (program.example) { | ||
console.log(program.example); | ||
const exampleCommand = `${nextExamplesBaseCommand}${program.example}`; | ||
execSync(exampleCommand, { stdio: 'inherit' }); | ||
} else { | ||
createApp( | ||
projectName, | ||
program.verbose, | ||
program.scriptsVersion, | ||
hiddenProgram.internalTestingTemplate | ||
); | ||
} | ||
function createApp(name, verbose, version, template) { | ||
@@ -137,0 +149,0 @@ const root = path.resolve(name); |
{ | ||
"name": "create-next-app", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "next", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20580
572