create-skeleton-app
Advanced tools
Comparing version 0.0.46-beta.2 to 0.0.46-beta.3
{ | ||
"name": "create-skeleton-app", | ||
"version": "0.0.46-beta.2", | ||
"version": "0.0.46-beta.3", | ||
"description": "Use this CLI app to setup a new Skeleton application in a new SvelteKit project.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -28,5 +28,9 @@ #!/usr/bin/env node | ||
if (!('quiet' in opts)) opts.quiet = false; | ||
if (!('skeletontemplatedir' in opts)) opts.skeletontemplatedir = '../templates'; | ||
// Resolve can handle multiple absolute paths so passing in a relative or absolute path is fine | ||
opts.skeletontemplatedir = resolve(process.cwd(), opts.skeletontemplatedir); | ||
// if no templatedir is provided we have to account for the dist location | ||
if (!('skeletontemplatedir' in opts)) { | ||
opts.skeletontemplatedir = resolve(dist('.'), '../templates'); | ||
} else { | ||
// Resolve can handle multiple absolute paths so passing in a relative or absolute path is fine | ||
opts.skeletontemplatedir = resolve(process.cwd(), opts.skeletontemplatedir); | ||
} | ||
@@ -160,3 +164,3 @@ try { | ||
// or it holds multiple directories with csa-meta files in them and skeletontemplate selects that sub folder. | ||
let templateFound = false; | ||
@@ -175,3 +179,3 @@ // they have asked for a specific template within the folder | ||
if (!templateFound) { | ||
const metaFiles = fg.sync(['**/csa-meta.json'], { cwd: opts.skeletontemplatedir, deep:2 }) | ||
const metaFiles = fg.sync(['**/csa-meta.json'], { cwd: opts.skeletontemplatedir, deep: 2 }) | ||
if (metaFiles.length === 0) { | ||
@@ -187,3 +191,3 @@ console.error(`No templates found in ${opts.skeletontemplatedir}`); | ||
if (enabled) { | ||
parsedChoices.push({ position, label, hint: description, value: path}); | ||
parsedChoices.push({ position, label, hint: description, value: path }); | ||
} | ||
@@ -202,3 +206,3 @@ }); | ||
if (opts.meta.requiredFeatures) { | ||
opts.meta.requiredFeatures.forEach((val) => {Object.assign(opts, val)}) | ||
opts.meta.requiredFeatures.forEach((val) => { Object.assign(opts, val) }) | ||
} | ||
@@ -244,6 +248,6 @@ | ||
let msg = '' | ||
packages.forEach((p) => {if (p.force) msg += p.package + '\n'}); | ||
if (msg.length > 0){ | ||
packages.forEach((p) => { if (p.force) msg += p.package + '\n' }); | ||
if (msg.length > 0) { | ||
msg = `\nThe following packages will be installed because they are required by the template:\n\n${msg}\nWhat other packages would you like to install:`; | ||
}else{ | ||
} else { | ||
msg = `\nWhat other packages would you like to install:`; | ||
@@ -250,0 +254,0 @@ } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
73937
798
1