sv 0.5.7 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +17 -8
- package/dist/bin.js.map +1 -1
- package/dist/shared.json +3 -3
- package/dist/templates/demo/files.types=checkjs.json +1 -1
- package/dist/templates/demo/files.types=typescript.json +1 -1
- package/dist/templates/library/files.types=checkjs.json +1 -1
- package/dist/templates/library/files.types=typescript.json +1 -1
- package/dist/templates/minimal/files.types=checkjs.json +1 -1
- package/dist/templates/minimal/files.types=typescript.json +1 -1
- package/package.json +3 -3
package/dist/bin.js
CHANGED
|
@@ -25,7 +25,7 @@ import require$$0$3 from 'events';
|
|
|
25
25
|
import { t as templates, c as create$2 } from './index-A89HFWzv.js';
|
|
26
26
|
|
|
27
27
|
var name = "sv";
|
|
28
|
-
var version = "0.5.
|
|
28
|
+
var version = "0.5.9";
|
|
29
29
|
var type = "module";
|
|
30
30
|
var description = "A CLI for creating and updating SvelteKit projects";
|
|
31
31
|
var license = "MIT";
|
|
@@ -50198,7 +50198,7 @@ const options$2 = defineAdderOptions({
|
|
|
50198
50198
|
var lucia = defineAdder({
|
|
50199
50199
|
id: "lucia",
|
|
50200
50200
|
environments: { svelte: false, kit: true },
|
|
50201
|
-
homepage: "https://lucia-
|
|
50201
|
+
homepage: "https://lucia-auth.com",
|
|
50202
50202
|
options: options$2,
|
|
50203
50203
|
packages: [
|
|
50204
50204
|
{ name: "@oslojs/crypto", version: "^1.0.1", dev: false },
|
|
@@ -51497,12 +51497,16 @@ var tailwindcss = defineAdder({
|
|
|
51497
51497
|
{
|
|
51498
51498
|
name: () => "src/app.css",
|
|
51499
51499
|
content: ({ content }) => {
|
|
51500
|
-
const { ast, generateCode } = parseCss(content);
|
|
51501
51500
|
const layerImports = ["base", "components", "utilities"].map(
|
|
51502
|
-
(layer) => `
|
|
51501
|
+
(layer) => `tailwindcss/${layer}`
|
|
51503
51502
|
);
|
|
51503
|
+
if (layerImports.every((i) => content.includes(i))) {
|
|
51504
|
+
return content;
|
|
51505
|
+
}
|
|
51506
|
+
const { ast, generateCode } = parseCss(content);
|
|
51504
51507
|
const originalFirst = ast.first;
|
|
51505
|
-
const
|
|
51508
|
+
const specifiers = layerImports.map((i) => `'${i}'`);
|
|
51509
|
+
const nodes = addImports(ast, specifiers);
|
|
51506
51510
|
if (originalFirst !== ast.first && originalFirst?.type === "atrule" && originalFirst.name === "import") {
|
|
51507
51511
|
originalFirst.raws.before = "\n";
|
|
51508
51512
|
}
|
|
@@ -55404,7 +55408,7 @@ Available options: ${communityAdderIds.join(", ")}`
|
|
|
55404
55408
|
};
|
|
55405
55409
|
}).filter((a) => !!a);
|
|
55406
55410
|
const selected = await multiselect({
|
|
55407
|
-
message:
|
|
55411
|
+
message: `What would you like to add to your project? ${pc.dim("(use arrow keys / space bar)")}`,
|
|
55408
55412
|
options: adderOptions,
|
|
55409
55413
|
required: false
|
|
55410
55414
|
});
|
|
@@ -55563,6 +55567,7 @@ async function runAdders({
|
|
|
55563
55567
|
);
|
|
55564
55568
|
const details = adderDetails.concat(commDetails);
|
|
55565
55569
|
details.sort((a, b) => {
|
|
55570
|
+
if (!a.dependsOn && !b.dependsOn) return 0;
|
|
55566
55571
|
if (!a.dependsOn) return -1;
|
|
55567
55572
|
if (!b.dependsOn) return 1;
|
|
55568
55573
|
return a.dependsOn.includes(b.id) ? 1 : b.dependsOn.includes(a.id) ? -1 : 0;
|
|
@@ -55699,15 +55704,19 @@ const create = new Command("create").description("scaffolds a new SvelteKit proj
|
|
|
55699
55704
|
const relative = path$3.relative(process$1$1.cwd(), directory);
|
|
55700
55705
|
const pm = packageManager ?? detectSync({ cwd })?.name ?? getUserAgent() ?? "npm";
|
|
55701
55706
|
if (relative !== "") {
|
|
55702
|
-
|
|
55707
|
+
const pathHasSpaces = relative.includes(" ");
|
|
55708
|
+
initialSteps.push(
|
|
55709
|
+
`${i++}: ${highlight(`cd ${pathHasSpaces ? `"${relative}"` : relative}`)}`
|
|
55710
|
+
);
|
|
55703
55711
|
}
|
|
55704
55712
|
if (!packageManager) {
|
|
55705
55713
|
initialSteps.push(`${i++}: ${highlight(`${pm} install`)}`);
|
|
55706
55714
|
}
|
|
55715
|
+
const pmRun = pm === "npm" ? "npm run dev --" : `${pm} dev`;
|
|
55707
55716
|
const steps = [
|
|
55708
55717
|
...initialSteps,
|
|
55709
55718
|
`${i++}: ${highlight('git init && git add -A && git commit -m "Initial commit"')} (optional)`,
|
|
55710
|
-
`${i++}: ${highlight(`${
|
|
55719
|
+
`${i++}: ${highlight(`${pmRun} --open`)}`,
|
|
55711
55720
|
"",
|
|
55712
55721
|
`To close the dev server, hit ${highlight("Ctrl-C")}`,
|
|
55713
55722
|
"",
|