create-supaslidev 0.2.1 → 0.3.0
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/cli.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +7 -7
- package/templates/default/gitignore.ejs +0 -1
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import pc from "picocolors";
|
|
|
10
10
|
import { tmpdir } from "node:os";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/version.ts
|
|
13
|
-
const CLI_VERSION = "0.
|
|
13
|
+
const CLI_VERSION = "0.3.0";
|
|
14
14
|
const PACKAGE_NAME = "@supaslidev/cli";
|
|
15
15
|
const CACHE_DIR = join(tmpdir(), "supaslidev-cli");
|
|
16
16
|
const CACHE_FILE = join(CACHE_DIR, "version-cache.json");
|
|
@@ -362,7 +362,7 @@ async function create(options = {}) {
|
|
|
362
362
|
message: "What is your project name?",
|
|
363
363
|
placeholder: "my-presentations",
|
|
364
364
|
validate: (value) => {
|
|
365
|
-
if (!value
|
|
365
|
+
if (!value?.trim()) return "Project name is required";
|
|
366
366
|
if (!/^[a-z0-9-]+$/.test(value)) return "Project name must be lowercase alphanumeric with hyphens only";
|
|
367
367
|
if (value.startsWith("-") || value.endsWith("-")) return "Project name cannot start or end with a hyphen";
|
|
368
368
|
}
|
|
@@ -377,7 +377,7 @@ async function create(options = {}) {
|
|
|
377
377
|
placeholder: "my-first-deck",
|
|
378
378
|
initialValue: "my-first-deck",
|
|
379
379
|
validate: (value) => {
|
|
380
|
-
if (!value
|
|
380
|
+
if (!value?.trim()) return "Presentation name is required";
|
|
381
381
|
if (!/^[a-z0-9-]+$/.test(value)) return "Presentation name must be lowercase alphanumeric with hyphens only";
|
|
382
382
|
if (value.startsWith("-") || value.endsWith("-")) return "Presentation name cannot start or end with a hyphen";
|
|
383
383
|
}
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { parse, parseDocument, stringify } from "yaml";
|
|
|
11
11
|
import { IndentationText, Node, Project, SyntaxKind } from "ts-morph";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/version.ts
|
|
14
|
-
const CLI_VERSION = "0.
|
|
14
|
+
const CLI_VERSION = "0.3.0";
|
|
15
15
|
const PACKAGE_NAME = "@supaslidev/cli";
|
|
16
16
|
const CACHE_DIR = join(tmpdir(), "supaslidev-cli");
|
|
17
17
|
const CACHE_FILE = join(CACHE_DIR, "version-cache.json");
|
|
@@ -363,7 +363,7 @@ async function create(options = {}) {
|
|
|
363
363
|
message: "What is your project name?",
|
|
364
364
|
placeholder: "my-presentations",
|
|
365
365
|
validate: (value) => {
|
|
366
|
-
if (!value
|
|
366
|
+
if (!value?.trim()) return "Project name is required";
|
|
367
367
|
if (!/^[a-z0-9-]+$/.test(value)) return "Project name must be lowercase alphanumeric with hyphens only";
|
|
368
368
|
if (value.startsWith("-") || value.endsWith("-")) return "Project name cannot start or end with a hyphen";
|
|
369
369
|
}
|
|
@@ -378,7 +378,7 @@ async function create(options = {}) {
|
|
|
378
378
|
placeholder: "my-first-deck",
|
|
379
379
|
initialValue: "my-first-deck",
|
|
380
380
|
validate: (value) => {
|
|
381
|
-
if (!value
|
|
381
|
+
if (!value?.trim()) return "Presentation name is required";
|
|
382
382
|
if (!/^[a-z0-9-]+$/.test(value)) return "Presentation name must be lowercase alphanumeric with hyphens only";
|
|
383
383
|
if (value.startsWith("-") || value.endsWith("-")) return "Presentation name cannot start or end with a hyphen";
|
|
384
384
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-supaslidev",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "CLI tool for scaffolding Supaslidev presentations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"slidev",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@clack/prompts": "^0.
|
|
41
|
-
"commander": "^
|
|
42
|
-
"ejs": "^
|
|
40
|
+
"@clack/prompts": "^1.0.0",
|
|
41
|
+
"commander": "^14.0.0",
|
|
42
|
+
"ejs": "^5.0.0",
|
|
43
43
|
"picocolors": "^1.1.1",
|
|
44
|
-
"ts-morph": "^
|
|
44
|
+
"ts-morph": "^27.0.0",
|
|
45
45
|
"yaml": "^2.7.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/ejs": "^3.1.5",
|
|
49
|
-
"@types/node": "^
|
|
49
|
+
"@types/node": "^24.0.0",
|
|
50
50
|
"tsdown": "^0.21.6",
|
|
51
51
|
"tsx": "^4.19.0",
|
|
52
|
-
"typescript": "^
|
|
52
|
+
"typescript": "^6.0.0",
|
|
53
53
|
"vitest": "^4.0.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|