sv 0.6.5 → 0.6.6
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/README.md +8 -4
- package/dist/bin.js +23 -6
- package/dist/bin.js.map +1 -1
- package/dist/{lib/index.d.ts → index.d.ts} +2 -2
- package/dist/templates/demo/assets/DOT-gitignore +2 -0
- package/dist/templates/demo/package.json +3 -3
- package/dist/templates/library/assets/DOT-gitignore +2 -0
- package/dist/templates/library/package.json +3 -3
- package/dist/templates/minimal/assets/DOT-gitignore +2 -0
- package/dist/templates/minimal/package.json +3 -3
- package/package.json +4 -4
- /package/dist/{lib/install.d.ts → install.d.ts} +0 -0
- /package/dist/{lib/testing.d.ts → testing.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -6,11 +6,9 @@ A command line interface (CLI) for creating and maintaining [Svelte](https://sve
|
|
|
6
6
|
npx sv
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Documentation
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
This project was formed by merging the `create-svelte` and `svelte-add` CLIs. Thank you to [J](https://github.com/babichjacob) for starting the community-led `svelte-add` project and to the [`svelte-add` contributors](https://github.com/svelte-add/svelte-add/graphs/contributors).
|
|
11
|
+
[Documentation](https://svelte.dev/docs/cli/overview)
|
|
14
12
|
|
|
15
13
|
## Changelog
|
|
16
14
|
|
|
@@ -19,3 +17,9 @@ This project was formed by merging the `create-svelte` and `svelte-add` CLIs. Th
|
|
|
19
17
|
## License
|
|
20
18
|
|
|
21
19
|
[MIT](../../LICENSE)
|
|
20
|
+
|
|
21
|
+
## Acknowledgements
|
|
22
|
+
|
|
23
|
+
Thank you to [Christopher Brown](https://github.com/chbrown) who originally owned the `sv` name on npm for graciously allowing it to be used for this package. You can find the original `sv` package at [`@chbrown/sv`](https://www.npmjs.com/package/@chbrown/sv).
|
|
24
|
+
|
|
25
|
+
This project was formed by merging the `create-svelte` and `svelte-add` CLIs. Thank you to [J](https://github.com/babichjacob) for starting the community-led `svelte-add` project and to the [`svelte-add` contributors](https://github.com/svelte-add/svelte-add/graphs/contributors).
|
package/dist/bin.js
CHANGED
|
@@ -24,7 +24,7 @@ import 'stream';
|
|
|
24
24
|
import 'readline';
|
|
25
25
|
|
|
26
26
|
var name = "sv";
|
|
27
|
-
var version = "0.6.
|
|
27
|
+
var version = "0.6.6";
|
|
28
28
|
var type = "module";
|
|
29
29
|
var description = "A CLI for creating and updating SvelteKit projects";
|
|
30
30
|
var license = "MIT";
|
|
@@ -5266,6 +5266,7 @@ var eslint = defineAddon({
|
|
|
5266
5266
|
run: ({ sv, typescript, dependencyVersion }) => {
|
|
5267
5267
|
const prettierInstalled = Boolean(dependencyVersion("prettier"));
|
|
5268
5268
|
sv.devDependency("eslint", "^9.7.0");
|
|
5269
|
+
sv.devDependency("@eslint/compat", "^1.2.3");
|
|
5269
5270
|
sv.devDependency("globals", "^15.0.0");
|
|
5270
5271
|
sv.devDependency("eslint-plugin-svelte", "^2.36.0");
|
|
5271
5272
|
if (typescript) sv.devDependency("typescript-eslint", "^8.0.0");
|
|
@@ -5291,6 +5292,12 @@ var eslint = defineAddon({
|
|
|
5291
5292
|
sv.file("eslint.config.js", (content) => {
|
|
5292
5293
|
const { ast, generateCode } = parseScript(content);
|
|
5293
5294
|
const eslintConfigs = [];
|
|
5295
|
+
const gitIgnorePathStatement = common.statementFromString(
|
|
5296
|
+
'\nconst gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));'
|
|
5297
|
+
);
|
|
5298
|
+
common.addStatement(ast, gitIgnorePathStatement);
|
|
5299
|
+
const ignoresConfig = common.expressionFromString("includeIgnoreFile(gitignorePath)");
|
|
5300
|
+
eslintConfigs.push(ignoresConfig);
|
|
5294
5301
|
const jsConfig = common.expressionFromString("js.configs.recommended");
|
|
5295
5302
|
eslintConfigs.push(jsConfig);
|
|
5296
5303
|
if (typescript) {
|
|
@@ -5322,10 +5329,6 @@ var eslint = defineAddon({
|
|
|
5322
5329
|
});
|
|
5323
5330
|
eslintConfigs.push(svelteTSParserConfig);
|
|
5324
5331
|
}
|
|
5325
|
-
const ignoresConfig = object$1.create({
|
|
5326
|
-
ignores: common.expressionFromString('["build/", ".svelte-kit/", "dist/"]')
|
|
5327
|
-
});
|
|
5328
|
-
eslintConfigs.push(ignoresConfig);
|
|
5329
5332
|
let exportExpression;
|
|
5330
5333
|
if (typescript) {
|
|
5331
5334
|
const tsConfigCall = _function.call("ts.config", []);
|
|
@@ -5344,8 +5347,10 @@ var eslint = defineAddon({
|
|
|
5344
5347
|
if (!typescript)
|
|
5345
5348
|
common.addJsDocTypeComment(defaultExport.astNode, "import('eslint').Linter.Config[]");
|
|
5346
5349
|
if (typescript) imports.addDefault(ast, "typescript-eslint", "ts");
|
|
5350
|
+
imports.addNamed(ast, "node:url", { fileURLToPath: "fileURLToPath" });
|
|
5347
5351
|
imports.addDefault(ast, "globals", "globals");
|
|
5348
5352
|
imports.addDefault(ast, "eslint-plugin-svelte", "svelte");
|
|
5353
|
+
imports.addNamed(ast, "@eslint/compat", { includeIgnoreFile: "includeIgnoreFile" });
|
|
5349
5354
|
imports.addDefault(ast, "@eslint/js", "js");
|
|
5350
5355
|
return generateCode();
|
|
5351
5356
|
});
|
|
@@ -7389,6 +7394,7 @@ var paraglide = defineAddon({
|
|
|
7389
7394
|
run: ({ sv, options: options2, typescript, kit: kit$1, dependencyVersion }) => {
|
|
7390
7395
|
const ext = typescript ? "ts" : "js";
|
|
7391
7396
|
if (!kit$1) throw new Error("SvelteKit is required");
|
|
7397
|
+
const paraglideOutDir = "src/lib/paraglide";
|
|
7392
7398
|
sv.dependency("@inlang/paraglide-sveltekit", "^0.11.1");
|
|
7393
7399
|
sv.file("project.inlang/settings.json", (content) => {
|
|
7394
7400
|
if (content) return content;
|
|
@@ -7412,7 +7418,7 @@ var paraglide = defineAddon({
|
|
|
7412
7418
|
const pluginFunctionCall = _function.call(vitePluginName, []);
|
|
7413
7419
|
const pluginConfig = object$1.create({
|
|
7414
7420
|
project: common.createLiteral("./project.inlang"),
|
|
7415
|
-
outdir: common.createLiteral(
|
|
7421
|
+
outdir: common.createLiteral(`./${paraglideOutDir}`)
|
|
7416
7422
|
});
|
|
7417
7423
|
_function.argumentByIndex(pluginFunctionCall, 0, pluginConfig);
|
|
7418
7424
|
array$1.push(pluginsArray, pluginFunctionCall);
|
|
@@ -7486,6 +7492,17 @@ var paraglide = defineAddon({
|
|
|
7486
7492
|
};
|
|
7487
7493
|
return generateCode();
|
|
7488
7494
|
});
|
|
7495
|
+
sv.file(".gitignore", (content) => {
|
|
7496
|
+
if (!content) return content;
|
|
7497
|
+
if (!content.includes(`
|
|
7498
|
+
${paraglideOutDir}`)) {
|
|
7499
|
+
content = content.trimEnd() + `
|
|
7500
|
+
|
|
7501
|
+
# Paraglide
|
|
7502
|
+
${paraglideOutDir}`;
|
|
7503
|
+
}
|
|
7504
|
+
return content;
|
|
7505
|
+
});
|
|
7489
7506
|
if (options2.demo) {
|
|
7490
7507
|
sv.file(`${kit$1.routesDirectory}/demo/+page.svelte`, (content) => {
|
|
7491
7508
|
return addToDemoPage(content, "paraglide");
|