@skirtle/create-vue-lib 0.0.3 → 0.0.5
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/LICENSE +21 -0
- package/dist/index.cjs +6 -4
- package/dist/template/base/config/package.json.ejs +8 -9
- package/dist/template/base/config/packages/@projectName@/package.json.ejs +12 -10
- package/dist/template/base/config/packages/@projectName@/vite.config.mts.ejs +12 -5
- package/dist/template/playground/config/packages/playground/package.json +6 -5
- package/dist/template/vitepress/config/packages/docs/package.json +4 -3
- package/package.json +6 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, skirtle
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/dist/index.cjs
CHANGED
|
@@ -5623,7 +5623,7 @@ var import_ejs = __toESM(require_ejs(), 1);
|
|
|
5623
5623
|
// package.json
|
|
5624
5624
|
var package_default = {
|
|
5625
5625
|
name: "@skirtle/create-vue-lib",
|
|
5626
|
-
version: "0.0.
|
|
5626
|
+
version: "0.0.5",
|
|
5627
5627
|
author: "skirtle",
|
|
5628
5628
|
license: "MIT",
|
|
5629
5629
|
description: "Create a library using Vue and Vite",
|
|
@@ -5655,17 +5655,19 @@ var package_default = {
|
|
|
5655
5655
|
ejs: "^3.1.10",
|
|
5656
5656
|
"npm-run-all2": "^7.0.2",
|
|
5657
5657
|
prompts: "^2.4.2",
|
|
5658
|
+
publint: "^0.3.8",
|
|
5658
5659
|
rimraf: "^6.0.1",
|
|
5659
5660
|
tsup: "^8.3.6",
|
|
5660
5661
|
typescript: "^5.7.3"
|
|
5661
5662
|
},
|
|
5662
5663
|
scripts: {
|
|
5663
|
-
clean: "rimraf dist README.md",
|
|
5664
|
+
clean: "rimraf dist LICENSE README.md",
|
|
5664
5665
|
"type-check": "tsc",
|
|
5665
|
-
"
|
|
5666
|
+
"lint:package": "publint",
|
|
5667
|
+
"build:copy": "copyfiles -f ../../LICENSE ../../README.md .",
|
|
5666
5668
|
"build:templates": 'copyfiles -u 1 -a "src/template/**" dist',
|
|
5667
5669
|
"build:ts": "tsup src/index.ts --format cjs --target node18",
|
|
5668
|
-
build: "run-s clean build:copy build:templates build:ts",
|
|
5670
|
+
build: "run-s clean build:copy build:templates build:ts lint:package",
|
|
5669
5671
|
start: "node ./dist/index.cjs",
|
|
5670
5672
|
preinstall: "npx only-allow pnpm"
|
|
5671
5673
|
}
|
|
@@ -46,26 +46,25 @@
|
|
|
46
46
|
<%_ } _%>
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
<%_ if (config.includeEsLint) { _%>
|
|
49
|
-
"@eslint/compat": "^1.2.
|
|
49
|
+
"@eslint/compat": "^1.2.7",
|
|
50
50
|
<%_ if (config.includeEsLintStylistic) { _%>
|
|
51
|
-
"@stylistic/eslint-plugin": "^4.
|
|
51
|
+
"@stylistic/eslint-plugin": "^4.2.0",
|
|
52
52
|
<%_ } _%>
|
|
53
53
|
"@tsconfig/node22": "^22.0.0",
|
|
54
|
-
"@types/node": "^22.13.
|
|
55
|
-
"@typescript-eslint/parser": "^8.23.0",
|
|
54
|
+
"@types/node": "^22.13.9",
|
|
56
55
|
<%_ if (config.includeVitest) { _%>
|
|
57
|
-
"@vitest/eslint-plugin": "1.1.
|
|
56
|
+
"@vitest/eslint-plugin": "^1.1.36",
|
|
58
57
|
<%_ } _%>
|
|
59
|
-
"@vue/eslint-config-typescript": "^14.
|
|
60
|
-
"eslint": "^9.
|
|
61
|
-
"eslint-plugin-vue": "
|
|
58
|
+
"@vue/eslint-config-typescript": "^14.5.0",
|
|
59
|
+
"eslint": "^9.21.0",
|
|
60
|
+
"eslint-plugin-vue": "~10.0.0",
|
|
62
61
|
"jiti": "^2.4.2",
|
|
63
62
|
"lint-staged": "^15.4.3",
|
|
64
63
|
"npm-run-all2": "^7.0.2",
|
|
65
64
|
<%_ } _%>
|
|
66
65
|
"simple-git-hooks": "^2.11.1",
|
|
67
66
|
<%_ if (config.includeEsLint) { _%>
|
|
68
|
-
"typescript": "~5.
|
|
67
|
+
"typescript": "~5.8.0"
|
|
69
68
|
<%_ } _%>
|
|
70
69
|
}
|
|
71
70
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "<%- config.githubRepository %>"
|
|
14
14
|
},
|
|
15
|
+
"type": "module",
|
|
15
16
|
"sideEffects": false,
|
|
16
17
|
"main": "dist/<%- config.unscopedPackageName %>.cjs",
|
|
17
18
|
"module": "dist/<%- config.unscopedPackageName %>.esm-bundler.prod.mjs",
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
".": {
|
|
23
24
|
"types": "./dist/<%- config.unscopedPackageName %>.d.ts",
|
|
24
25
|
"import": {
|
|
25
|
-
"development": "./dist/<%- config.unscopedPackageName %>.esm.dev.
|
|
26
|
+
"development": "./dist/<%- config.unscopedPackageName %>.esm.dev.mjs",
|
|
26
27
|
"default": "./dist/<%- config.unscopedPackageName %>.esm-bundler.prod.mjs"
|
|
27
28
|
},
|
|
28
29
|
"require": "./dist/<%- config.unscopedPackageName %>.cjs"
|
|
@@ -40,26 +41,26 @@
|
|
|
40
41
|
"@rollup/plugin-replace": "^6.0.2",
|
|
41
42
|
"@tsconfig/node22": "^22.0.0",
|
|
42
43
|
"@types/jsdom": "^21.1.7",
|
|
43
|
-
"@types/node": "^22.13.
|
|
44
|
+
"@types/node": "^22.13.9",
|
|
44
45
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
45
46
|
<%_ if (config.includeVitest) { _%>
|
|
46
|
-
"@vitest/coverage-v8": "^3.0.
|
|
47
|
+
"@vitest/coverage-v8": "^3.0.8",
|
|
47
48
|
"@vue/test-utils": "^2.4.6",
|
|
48
49
|
<%_ } _%>
|
|
49
50
|
"@vue/tsconfig": "^0.7.0",
|
|
50
51
|
"copyfiles": "^2.4.1",
|
|
51
|
-
"cross-env": "^7.0.3",
|
|
52
52
|
"jsdom": "^26.0.0",
|
|
53
53
|
"npm-run-all2": "^7.0.2",
|
|
54
|
+
"publint": "^0.3.8",
|
|
54
55
|
"rimraf": "^5.0.1",
|
|
55
|
-
"typescript": "~5.
|
|
56
|
-
"vite": "^6.1
|
|
56
|
+
"typescript": "~5.8.0",
|
|
57
|
+
"vite": "^6.2.1",
|
|
57
58
|
"vite-plugin-dts": "^4.5.3",
|
|
58
59
|
<%_ if (config.includeVitest) { _%>
|
|
59
|
-
"vitest": "^3.0.
|
|
60
|
+
"vitest": "^3.0.8",
|
|
60
61
|
<%_ } _%>
|
|
61
62
|
"vue": "^3.5.13",
|
|
62
|
-
"vue-tsc": "^2.2.
|
|
63
|
+
"vue-tsc": "^2.2.8"
|
|
63
64
|
},
|
|
64
65
|
"scripts": {
|
|
65
66
|
"clean:dist": "rimraf dist",
|
|
@@ -69,10 +70,11 @@
|
|
|
69
70
|
"coverage": "vitest run --coverage --environment jsdom",
|
|
70
71
|
<%_ } _%>
|
|
71
72
|
"type-check": "vue-tsc --build",
|
|
73
|
+
"lint:package": "publint",
|
|
72
74
|
"build:copy": "copyfiles -f ../../README.md .",
|
|
73
|
-
"build:dev": "
|
|
75
|
+
"build:dev": "vite build --mode development",
|
|
74
76
|
"build:neutral": "vite build --mode neutral",
|
|
75
77
|
"build:prod": "vite build --mode production",
|
|
76
|
-
"build": "run-s clean:dist build:* type-check"
|
|
78
|
+
"build": "run-s clean:dist build:* type-check lint:package"
|
|
77
79
|
}
|
|
78
80
|
}
|
|
@@ -13,7 +13,7 @@ export default defineConfig(({ mode }): UserConfig => {
|
|
|
13
13
|
throw new Error(`Unknown mode: ${mode}`)
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const expectedNodeEnv = mode === '
|
|
16
|
+
const expectedNodeEnv = mode === 'test' ? 'test' : 'production'
|
|
17
17
|
const nodeEnv = process.env.NODE_ENV
|
|
18
18
|
|
|
19
19
|
if (nodeEnv !== expectedNodeEnv) {
|
|
@@ -35,7 +35,12 @@ export default defineConfig(({ mode }): UserConfig => {
|
|
|
35
35
|
__DEV__: mode === 'production' ? 'false' : mode === 'development' ? 'true' : '!(process.env.NODE_ENV === "production")'
|
|
36
36
|
}
|
|
37
37
|
}),
|
|
38
|
-
vue(
|
|
38
|
+
vue({
|
|
39
|
+
features: {
|
|
40
|
+
componentIdGenerator: 'filepath',
|
|
41
|
+
prodDevtools: mode === 'development'
|
|
42
|
+
}
|
|
43
|
+
}),
|
|
39
44
|
dtsPlugin
|
|
40
45
|
],
|
|
41
46
|
<%_ if (config.includeAtAliases) { _%>
|
|
@@ -69,14 +74,19 @@ export default defineConfig(({ mode }): UserConfig => {
|
|
|
69
74
|
}
|
|
70
75
|
else if (format === 'es') {
|
|
71
76
|
name += '.esm'
|
|
77
|
+
extension = 'mjs'
|
|
72
78
|
|
|
73
79
|
if (mode === 'neutral') {
|
|
74
80
|
name += '-bundler.prod'
|
|
75
81
|
}
|
|
76
82
|
else if (mode === 'production') {
|
|
77
83
|
name += '-browser'
|
|
84
|
+
extension = 'js'
|
|
78
85
|
}
|
|
79
86
|
}
|
|
87
|
+
else {
|
|
88
|
+
extension = 'cjs'
|
|
89
|
+
}
|
|
80
90
|
|
|
81
91
|
if (mode === 'production') {
|
|
82
92
|
name += '.prod'
|
|
@@ -84,9 +94,6 @@ export default defineConfig(({ mode }): UserConfig => {
|
|
|
84
94
|
else if (mode === 'development') {
|
|
85
95
|
name += '.dev'
|
|
86
96
|
}
|
|
87
|
-
else if (mode === 'neutral') {
|
|
88
|
-
extension = format === 'cjs' ? 'cjs' : 'mjs'
|
|
89
|
-
}
|
|
90
97
|
|
|
91
98
|
return `${name}.${extension}`
|
|
92
99
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
|
+
"type": "module",
|
|
3
4
|
"scripts": {
|
|
4
5
|
"clean": "rimraf dist",
|
|
5
6
|
"dev": "vite --port 5051",
|
|
@@ -13,14 +14,14 @@
|
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
15
16
|
"@tsconfig/node22": "^22.0.0",
|
|
16
|
-
"@types/node": "^22.13.
|
|
17
|
+
"@types/node": "^22.13.9",
|
|
17
18
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
18
19
|
"@vue/tsconfig": "^0.7.0",
|
|
19
20
|
"npm-run-all2": "^7.0.2",
|
|
20
21
|
"rimraf": "^5.0.1",
|
|
21
|
-
"typescript": "~5.
|
|
22
|
-
"vite": "^6.1
|
|
23
|
-
"vite-plugin-vue-devtools": "^7.7.
|
|
24
|
-
"vue-tsc": "^2.2.
|
|
22
|
+
"typescript": "~5.8.0",
|
|
23
|
+
"vite": "^6.2.1",
|
|
24
|
+
"vite-plugin-vue-devtools": "^7.7.2",
|
|
25
|
+
"vue-tsc": "^2.2.8"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
|
+
"type": "module",
|
|
3
4
|
"scripts": {
|
|
4
5
|
"clean": "rimraf dist .vitepress/cache",
|
|
5
6
|
"dev": "vitepress dev .",
|
|
@@ -15,12 +16,12 @@
|
|
|
15
16
|
},
|
|
16
17
|
"devDependencies": {
|
|
17
18
|
"@tsconfig/node22": "^22.0.0",
|
|
18
|
-
"@types/node": "^22.13.
|
|
19
|
+
"@types/node": "^22.13.9",
|
|
19
20
|
"@vue/tsconfig": "^0.7.0",
|
|
20
21
|
"npm-run-all2": "^7.0.2",
|
|
21
22
|
"rimraf": "^6.0.1",
|
|
22
|
-
"typescript": "~5.
|
|
23
|
+
"typescript": "~5.8.0",
|
|
23
24
|
"vitepress": "^1.6.3",
|
|
24
|
-
"vue-tsc": "^2.2.
|
|
25
|
+
"vue-tsc": "^2.2.8"
|
|
25
26
|
}
|
|
26
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skirtle/create-vue-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"author": "skirtle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Create a library using Vue and Vite",
|
|
@@ -37,17 +37,19 @@
|
|
|
37
37
|
"ejs": "^3.1.10",
|
|
38
38
|
"npm-run-all2": "^7.0.2",
|
|
39
39
|
"prompts": "^2.4.2",
|
|
40
|
+
"publint": "^0.3.8",
|
|
40
41
|
"rimraf": "^6.0.1",
|
|
41
42
|
"tsup": "^8.3.6",
|
|
42
43
|
"typescript": "^5.7.3"
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
|
45
|
-
"clean": "rimraf dist README.md",
|
|
46
|
+
"clean": "rimraf dist LICENSE README.md",
|
|
46
47
|
"type-check": "tsc",
|
|
47
|
-
"
|
|
48
|
+
"lint:package": "publint",
|
|
49
|
+
"build:copy": "copyfiles -f ../../LICENSE ../../README.md .",
|
|
48
50
|
"build:templates": "copyfiles -u 1 -a \"src/template/**\" dist",
|
|
49
51
|
"build:ts": "tsup src/index.ts --format cjs --target node18",
|
|
50
|
-
"build": "run-s clean build:copy build:templates build:ts",
|
|
52
|
+
"build": "run-s clean build:copy build:templates build:ts lint:package",
|
|
51
53
|
"start": "node ./dist/index.cjs",
|
|
52
54
|
"preinstall": "npx only-allow pnpm"
|
|
53
55
|
}
|