@skirtle/create-vue-lib 0.0.1 → 0.0.2
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/index.cjs +174 -159
- package/dist/template/base/config/{.editorconfig → .editorconfig.ejs} +6 -0
- package/dist/template/base/config/.gitignore.ejs +33 -0
- package/dist/template/base/config/.vscode/extensions.json.ejs +10 -0
- package/dist/template/base/config/.vscode/settings.json.ejs +13 -0
- package/dist/template/base/config/LICENSE +0 -0
- package/dist/template/base/config/package.json.ejs +19 -8
- package/dist/template/base/config/packages/@projectName@/package.json +9 -7
- package/dist/template/base/config/packages/@projectName@/src/global.d.ts.ejs +4 -0
- package/dist/template/base/config/packages/@projectName@/{tsconfig.app.json → tsconfig.app.json.ejs} +3 -1
- package/dist/template/base/config/packages/@projectName@/tsconfig.node.json +1 -1
- package/dist/template/base/config/packages/@projectName@/tsconfig.vitest.json +1 -1
- package/dist/template/base/config/packages/@projectName@/{vite.config.mts → vite.config.mts.ejs} +14 -4
- package/dist/template/base/examples/packages/@projectName@/src/components/{ExampleComponent.vue → ExampleComponent.vue.ejs} +3 -0
- package/dist/template/eslint/config/tsconfig.json +10 -0
- package/dist/template/playground/config/packages/playground/package.json +4 -3
- package/dist/template/playground/config/packages/playground/tsconfig.app.json.ejs +13 -0
- package/dist/template/playground/config/packages/playground/tsconfig.node.json +1 -1
- package/dist/template/playground/config/packages/playground/vite.config.mts.ejs +45 -0
- package/dist/template/vitepress/config/packages/docs/.vitepress/config.mts.ejs +28 -3
- package/dist/template/vitepress/config/packages/docs/package.json +3 -3
- package/dist/template/vitepress/config/packages/docs/{tsconfig.app.json → tsconfig.app.json.ejs} +4 -2
- package/dist/template/vitepress/config/packages/docs/tsconfig.node.json +0 -1
- package/package.json +6 -9
- package/dist/template/base/config/packages/@projectName@/README.md.ejs +0 -5
- package/dist/template/base/config/packages/@projectName@/src/global.d.ts +0 -1
- package/dist/template/base/config/tsconfig.json +0 -4
- package/dist/template/playground/config/packages/playground/tsconfig.app.json +0 -11
- package/dist/template/playground/config/packages/playground/vite.config.mts +0 -22
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
.DS_Store
|
|
12
|
+
dist
|
|
13
|
+
dist-ssr
|
|
14
|
+
coverage
|
|
15
|
+
*.local
|
|
16
|
+
packages/docs/.vitepress/cache
|
|
17
|
+
packages/<%- config.mainPackageDirName %>/LICENSE
|
|
18
|
+
packages/<%- config.mainPackageDirName %>/README.md
|
|
19
|
+
|
|
20
|
+
/cypress/videos/
|
|
21
|
+
/cypress/screenshots/
|
|
22
|
+
|
|
23
|
+
# Editor directories and files
|
|
24
|
+
.vscode/*
|
|
25
|
+
!.vscode/extensions.json
|
|
26
|
+
.idea
|
|
27
|
+
*.suo
|
|
28
|
+
*.ntvs*
|
|
29
|
+
*.njsproj
|
|
30
|
+
*.sln
|
|
31
|
+
*.sw?
|
|
32
|
+
|
|
33
|
+
*.tsbuildinfo
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"explorer.fileNesting.enabled": true,
|
|
3
|
+
"explorer.fileNesting.patterns": {
|
|
4
|
+
"tsconfig.json": "tsconfig.*.json, env.d.ts",
|
|
5
|
+
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
|
|
6
|
+
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig"
|
|
7
|
+
},
|
|
8
|
+
<%_ if (config.includeEsLint) { _%>
|
|
9
|
+
"editor.codeActionsOnSave": {
|
|
10
|
+
"source.fixAll": "explicit"
|
|
11
|
+
}
|
|
12
|
+
<%_ } _%>
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -7,12 +7,6 @@
|
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
9
|
"clean": "pnpm run -r clean",
|
|
10
|
-
"build": "pnpm run -r build",
|
|
11
|
-
"type-check": "pnpm run -r type-check",
|
|
12
|
-
<%_ if (config.includeEsLint) { _%>
|
|
13
|
-
"lint": "eslint",
|
|
14
|
-
"lint:fix": "eslint --fix",
|
|
15
|
-
<%_ } _%>
|
|
16
10
|
<%_ if (config.includePlayground) { _%>
|
|
17
11
|
"dev": "pnpm run --filter ./packages/playground -r dev",
|
|
18
12
|
<%_ } _%>
|
|
@@ -22,12 +16,23 @@
|
|
|
22
16
|
<%_ } _%>
|
|
23
17
|
"test:unit": "pnpm run --filter ./packages/<%- config.mainPackageDirName %> -r test:unit",
|
|
24
18
|
"coverage": "pnpm run --filter ./packages/<%- config.mainPackageDirName %> -r coverage",
|
|
19
|
+
<%_ if (config.includeEsLint) { _%>
|
|
20
|
+
"type-check": "run-p type-check:*",
|
|
21
|
+
"type-check:packages": "pnpm run -r type-check",
|
|
22
|
+
"type-check:self": "tsc",
|
|
23
|
+
"lint": "eslint",
|
|
24
|
+
"lint:fix": "eslint --fix",
|
|
25
|
+
"lint:staged": "lint-staged",
|
|
26
|
+
<%_ } else { _%>
|
|
27
|
+
"type-check": "pnpm run -r type-check",
|
|
28
|
+
<%_ } _%>
|
|
29
|
+
"build": "pnpm run -r build",
|
|
25
30
|
"preinstall": "node scripts/preinstall.js",
|
|
26
31
|
"postinstall": "simple-git-hooks"
|
|
27
32
|
},
|
|
28
33
|
<%_ if (config.includeEsLint) { _%>
|
|
29
34
|
"simple-git-hooks": {
|
|
30
|
-
"pre-commit": "pnpm run type-check
|
|
35
|
+
"pre-commit": "pnpm exec run-s type-check lint:staged"
|
|
31
36
|
},
|
|
32
37
|
"lint-staged": {
|
|
33
38
|
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --fix"
|
|
@@ -43,6 +48,8 @@
|
|
|
43
48
|
<%_ if (config.includeEsLintStylistic) { _%>
|
|
44
49
|
"@stylistic/eslint-plugin": "^4.0.0",
|
|
45
50
|
<%_ } _%>
|
|
51
|
+
"@tsconfig/node22": "^22.0.0",
|
|
52
|
+
"@types/node": "^22.13.0",
|
|
46
53
|
"@typescript-eslint/parser": "^8.23.0",
|
|
47
54
|
"@vitest/eslint-plugin": "1.1.25",
|
|
48
55
|
"@vue/eslint-config-typescript": "^14.3.0",
|
|
@@ -50,7 +57,11 @@
|
|
|
50
57
|
"eslint-plugin-vue": "^9.32.0",
|
|
51
58
|
"jiti": "^2.4.2",
|
|
52
59
|
"lint-staged": "^15.4.3",
|
|
60
|
+
"npm-run-all2": "^7.0.2",
|
|
61
|
+
<%_ } _%>
|
|
62
|
+
"simple-git-hooks": "^2.11.1",
|
|
63
|
+
<%_ if (config.includeEsLint) { _%>
|
|
64
|
+
"typescript": "^5.7.3"
|
|
53
65
|
<%_ } _%>
|
|
54
|
-
"simple-git-hooks": "^2.11.1"
|
|
55
66
|
}
|
|
56
67
|
}
|
|
@@ -42,27 +42,29 @@
|
|
|
42
42
|
"@vitest/coverage-v8": "^3.0.5",
|
|
43
43
|
"@vue/test-utils": "^2.4.6",
|
|
44
44
|
"@vue/tsconfig": "^0.7.0",
|
|
45
|
+
"copyfiles": "^2.4.1",
|
|
46
|
+
"cross-env": "^7.0.3",
|
|
45
47
|
"jsdom": "^26.0.0",
|
|
46
48
|
"npm-run-all2": "^7.0.2",
|
|
47
49
|
"rimraf": "^5.0.1",
|
|
48
50
|
"typescript": "~5.7.3",
|
|
49
51
|
"vite": "^6.0.11",
|
|
50
|
-
"vite-plugin-dts": "
|
|
52
|
+
"vite-plugin-dts": "4.5.0",
|
|
51
53
|
"vitest": "^3.0.2",
|
|
52
54
|
"vue": "^3.5.13",
|
|
53
55
|
"vue-tsc": "^2.2.0"
|
|
54
56
|
},
|
|
55
57
|
"scripts": {
|
|
56
|
-
"clean": "rimraf dist coverage",
|
|
57
58
|
"clean:dist": "rimraf dist",
|
|
59
|
+
"clean": "rimraf dist coverage LICENSE README.md",
|
|
58
60
|
"test:unit": "vitest --environment jsdom",
|
|
59
61
|
"coverage": "vitest run --coverage --environment jsdom",
|
|
60
|
-
"build": "run-s clean:dist build-only type-check",
|
|
61
|
-
"build-only": "run-s build-dev build-neutral build-prod",
|
|
62
|
-
"build-dev": "vite build --mode development",
|
|
63
|
-
"build-neutral": "vite build --mode neutral",
|
|
64
|
-
"build-prod": "vite build --mode production",
|
|
65
62
|
"type-check": "vue-tsc --build",
|
|
63
|
+
"build:copy": "copyfiles -f ../../LICENSE ../../README.md .",
|
|
64
|
+
"build:dev": "cross-env NODE_ENV=development vite build --mode development",
|
|
65
|
+
"build:neutral": "vite build --mode neutral",
|
|
66
|
+
"build:prod": "vite build --mode production",
|
|
67
|
+
"build": "run-s clean:dist build:* type-check",
|
|
66
68
|
"preinstall": "node ../../scripts/preinstall.js"
|
|
67
69
|
}
|
|
68
70
|
}
|
package/dist/template/base/config/packages/@projectName@/{tsconfig.app.json → tsconfig.app.json.ejs}
RENAMED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
4
|
"exclude": ["src/**/__tests__/*"],
|
|
5
5
|
"compilerOptions": {
|
|
6
|
-
"tsBuildInfoFile": "
|
|
6
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
7
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
7
8
|
"paths": {
|
|
8
9
|
"@/*": ["./src/*"]
|
|
9
10
|
}
|
|
11
|
+
<%_ } _%>
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"compilerOptions": {
|
|
12
12
|
"noEmit": true,
|
|
13
|
-
"tsBuildInfoFile": "
|
|
13
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
14
14
|
"module": "ESNext",
|
|
15
15
|
"moduleResolution": "Bundler",
|
|
16
16
|
"types": ["node"]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"include": ["src/**/__tests__/*", "env.d.ts"],
|
|
4
4
|
"exclude": [],
|
|
5
5
|
"compilerOptions": {
|
|
6
|
-
"tsBuildInfoFile": "
|
|
6
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
|
|
7
7
|
"lib": [],
|
|
8
8
|
"types": ["node", "jsdom"]
|
|
9
9
|
}
|
package/dist/template/base/config/packages/@projectName@/{vite.config.mts → vite.config.mts.ejs}
RENAMED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { resolve } from 'node:path'
|
|
2
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
2
3
|
import { fileURLToPath, URL } from 'node:url'
|
|
4
|
+
<%_ } _%>
|
|
3
5
|
|
|
4
|
-
import { defineConfig } from 'vite'
|
|
6
|
+
import { defineConfig, type UserConfig } from 'vite'
|
|
5
7
|
import replace from '@rollup/plugin-replace'
|
|
6
8
|
import vue from '@vitejs/plugin-vue'
|
|
7
9
|
import dts from 'vite-plugin-dts'
|
|
8
10
|
|
|
9
|
-
export default defineConfig(({ mode }) => {
|
|
11
|
+
export default defineConfig(({ mode }): UserConfig => {
|
|
10
12
|
if (mode !== 'production' && mode !== 'development' && mode !== 'neutral' && mode !== 'test') {
|
|
11
13
|
throw new Error(`Unknown mode: ${mode}`)
|
|
12
14
|
}
|
|
@@ -29,22 +31,30 @@ export default defineConfig(({ mode }) => {
|
|
|
29
31
|
vue(),
|
|
30
32
|
dtsPlugin
|
|
31
33
|
],
|
|
34
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
32
35
|
resolve: {
|
|
33
36
|
alias: {
|
|
34
37
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
35
38
|
}
|
|
36
39
|
},
|
|
40
|
+
<%_ } _%>
|
|
41
|
+
<%_ if (config.includeTestVariable) { _%>
|
|
42
|
+
define: {
|
|
43
|
+
__TEST__: mode === 'test'
|
|
44
|
+
},
|
|
45
|
+
<%_ } _%>
|
|
37
46
|
build: {
|
|
38
47
|
target: 'es2019',
|
|
39
48
|
emptyOutDir: false,
|
|
40
49
|
minify: mode === 'production',
|
|
41
50
|
lib: {
|
|
42
51
|
entry: resolve(__dirname, 'src/index.ts'),
|
|
43
|
-
name: '
|
|
52
|
+
name: '<%- config.globalVariableName %>',
|
|
44
53
|
formats: mode === 'neutral' ? ['cjs', 'es'] : ['es', 'iife'],
|
|
54
|
+
cssFileName: mode === 'production' ? '<%- config.unscopedPackageName %>.prod' : '<%- config.unscopedPackageName %>',
|
|
45
55
|
|
|
46
56
|
fileName(format) {
|
|
47
|
-
let name = '
|
|
57
|
+
let name = '<%- config.unscopedPackageName %>'
|
|
48
58
|
let extension = 'js'
|
|
49
59
|
|
|
50
60
|
if (format === 'iife') {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"scripts": {
|
|
4
|
+
"clean": "rimraf dist",
|
|
4
5
|
"dev": "vite --port 5051",
|
|
5
6
|
"type-check": "vue-tsc --build",
|
|
6
|
-
"build
|
|
7
|
-
"build": "run-p -c type-check \"build
|
|
7
|
+
"build:only": "vite build",
|
|
8
|
+
"build": "run-p -c type-check \"build:only {@}\" --",
|
|
8
9
|
"preview": "vite preview --port 4051",
|
|
9
|
-
"
|
|
10
|
+
"preinstall": "node ../../scripts/preinstall.js"
|
|
10
11
|
},
|
|
11
12
|
"dependencies": {
|
|
12
13
|
"vue": "^3.5.13"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
6
|
+
"paths": {
|
|
7
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
8
|
+
"@/*": ["./src/*"],
|
|
9
|
+
<%_ } _%>
|
|
10
|
+
"<%- config.scopedPackageName %>": ["../<%- config.mainPackageDirName %>/src/index.ts"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"compilerOptions": {
|
|
12
12
|
"noEmit": true,
|
|
13
|
-
"tsBuildInfoFile": "
|
|
13
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
14
14
|
"module": "ESNext",
|
|
15
15
|
"moduleResolution": "Bundler",
|
|
16
16
|
"types": ["node"]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url'
|
|
2
|
+
|
|
3
|
+
import { defineConfig, type UserConfig } from 'vite'
|
|
4
|
+
import vue from '@vitejs/plugin-vue'
|
|
5
|
+
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
6
|
+
|
|
7
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
8
|
+
const librarySrc = fileURLToPath(new URL('../<%- config.mainPackageDirName %>/src/', import.meta.url))
|
|
9
|
+
const playgroundSrc = fileURLToPath(new URL('./src/', import.meta.url))
|
|
10
|
+
|
|
11
|
+
<%_ } _%>
|
|
12
|
+
export default defineConfig(({ mode }): UserConfig => ({
|
|
13
|
+
plugins: [
|
|
14
|
+
vue(),
|
|
15
|
+
vueDevTools()
|
|
16
|
+
],
|
|
17
|
+
resolve: {
|
|
18
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
19
|
+
alias: [
|
|
20
|
+
{
|
|
21
|
+
find: '@',
|
|
22
|
+
replacement: '@',
|
|
23
|
+
customResolver(source, importer) {
|
|
24
|
+
return source.replace(
|
|
25
|
+
/^@\//,
|
|
26
|
+
importer?.startsWith(librarySrc) ? librarySrc : playgroundSrc
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
}, {
|
|
30
|
+
find: '<%- config.scopedPackageName %>',
|
|
31
|
+
replacement: librarySrc
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
<%_ } else { _%>
|
|
35
|
+
alias: {
|
|
36
|
+
'<%- config.scopedPackageName %>': fileURLToPath(new URL('../<%- config.mainPackageDirName %>/src/', import.meta.url))
|
|
37
|
+
}
|
|
38
|
+
<%_ } _%>
|
|
39
|
+
},
|
|
40
|
+
define: {
|
|
41
|
+
__DEV__: mode !== 'production'<%_ if (config.includeTestVariable) { _%>,
|
|
42
|
+
__TEST__: false
|
|
43
|
+
<%_ } %>
|
|
44
|
+
}
|
|
45
|
+
}))
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url'
|
|
2
2
|
|
|
3
3
|
import { defineConfigWithTheme } from 'vitepress'
|
|
4
4
|
|
|
5
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
6
|
+
const librarySrc = fileURLToPath(new URL('../../<%- config.mainPackageDirName %>/src/', import.meta.url))
|
|
7
|
+
const playgroundSrc = fileURLToPath(new URL('../src/', import.meta.url))
|
|
8
|
+
|
|
9
|
+
<%_ } _%>
|
|
5
10
|
export default ({ mode }: { mode: string }) => defineConfigWithTheme({
|
|
6
11
|
srcDir: './src',
|
|
7
12
|
outDir: './dist',
|
|
@@ -30,13 +35,33 @@ export default ({ mode }: { mode: string }) => defineConfigWithTheme({
|
|
|
30
35
|
<%_ } _%>
|
|
31
36
|
vite: {
|
|
32
37
|
resolve: {
|
|
38
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
39
|
+
alias: [
|
|
40
|
+
{
|
|
41
|
+
find: '@',
|
|
42
|
+
replacement: '@',
|
|
43
|
+
customResolver(source, importer) {
|
|
44
|
+
return source.replace(
|
|
45
|
+
/^@\//,
|
|
46
|
+
importer?.startsWith(librarySrc) ? librarySrc : playgroundSrc
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
}, {
|
|
50
|
+
find: '<%- config.scopedPackageName %>',
|
|
51
|
+
replacement: librarySrc
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
<%_ } else { _%>
|
|
33
55
|
alias: {
|
|
34
|
-
'<%- config.scopedPackageName %>':
|
|
56
|
+
'<%- config.scopedPackageName %>': fileURLToPath(new URL('../../<%- config.mainPackageDirName %>/src/', import.meta.url))
|
|
35
57
|
}
|
|
58
|
+
<%_ } _%>
|
|
36
59
|
},
|
|
37
60
|
|
|
38
61
|
define: {
|
|
39
|
-
__DEV__:
|
|
62
|
+
__DEV__: mode !== 'production'<%_ if (config.includeTestVariable) { _%>,
|
|
63
|
+
__TEST__: false
|
|
64
|
+
<%_ } %>
|
|
40
65
|
}
|
|
41
66
|
},
|
|
42
67
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"scripts": {
|
|
4
4
|
"clean": "rimraf dist .vitepress/cache",
|
|
5
5
|
"dev": "vitepress dev .",
|
|
6
|
-
"type-check": "run-p -c type-check:*",
|
|
7
6
|
"type-check:code": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
|
8
7
|
"type-check:config": "vue-tsc --noEmit -p tsconfig.node.json --composite false",
|
|
9
|
-
"
|
|
10
|
-
"build": "
|
|
8
|
+
"type-check": "run-p -c type-check:*",
|
|
9
|
+
"build:only": "vitepress build .",
|
|
10
|
+
"build": "run-p -c type-check \"build:only {@}\" --",
|
|
11
11
|
"preview": "vitepress preview .",
|
|
12
12
|
"preinstall": "node ../../scripts/preinstall.js"
|
|
13
13
|
},
|
package/dist/template/vitepress/config/packages/docs/{tsconfig.app.json → tsconfig.app.json.ejs}
RENAMED
|
@@ -9,9 +9,11 @@
|
|
|
9
9
|
"src/**/*.md"
|
|
10
10
|
],
|
|
11
11
|
"compilerOptions": {
|
|
12
|
-
"tsBuildInfoFile": "../../node_modules/.tmp/tsconfig.docs.app.tsbuildinfo",
|
|
13
12
|
"paths": {
|
|
14
|
-
|
|
13
|
+
<%_ if (config.includeAtAliases) { _%>
|
|
14
|
+
"@/*": ["./src/*"],
|
|
15
|
+
<%_ } _%>
|
|
16
|
+
"<%- config.scopedPackageName %>": ["../<%- config.mainPackageDirName %>/src/index.ts"]
|
|
15
17
|
}
|
|
16
18
|
},
|
|
17
19
|
"vueCompilerOptions": {
|
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.2",
|
|
4
4
|
"author": "skirtle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Create a library using Vue and Vite",
|
|
@@ -35,23 +35,20 @@
|
|
|
35
35
|
"@types/prompts": "^2.4.9",
|
|
36
36
|
"copyfiles": "^2.4.1",
|
|
37
37
|
"ejs": "^3.1.10",
|
|
38
|
-
"lint-staged": "^15.4.3",
|
|
39
38
|
"npm-run-all2": "^7.0.2",
|
|
40
39
|
"prompts": "^2.4.2",
|
|
41
40
|
"rimraf": "^6.0.1",
|
|
42
|
-
"simple-git-hooks": "^2.11.1",
|
|
43
41
|
"tsup": "^8.3.6",
|
|
44
42
|
"typescript": "^5.7.3"
|
|
45
43
|
},
|
|
46
44
|
"scripts": {
|
|
47
|
-
"clean": "rimraf dist",
|
|
48
|
-
"
|
|
49
|
-
"build:copy": "copyfiles -
|
|
45
|
+
"clean": "rimraf dist LICENSE README.md",
|
|
46
|
+
"type-check": "tsc",
|
|
47
|
+
"build:copy": "copyfiles -f ../../LICENSE ../../README.md .",
|
|
48
|
+
"build:templates": "copyfiles -u 1 -a \"src/template/**\" dist",
|
|
50
49
|
"build:ts": "tsup src/index.ts --format cjs --target node18",
|
|
51
|
-
"build
|
|
50
|
+
"build": "run-s clean build:copy build:templates build:ts",
|
|
52
51
|
"start": "node ./dist/index.cjs",
|
|
53
|
-
"docs:dev": "pnpm run --filter ./docs -r dev",
|
|
54
|
-
"docs:build": "pnpm run --filter ./docs -r build",
|
|
55
52
|
"preinstall": "npx only-allow pnpm"
|
|
56
53
|
}
|
|
57
54
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare let __DEV__: boolean
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
4
|
-
"compilerOptions": {
|
|
5
|
-
"tsBuildInfoFile": "../../node_modules/.tmp/tsconfig.playground.app.tsbuildinfo",
|
|
6
|
-
"paths": {
|
|
7
|
-
"@/*": ["./src/*"],
|
|
8
|
-
"@scopedPackageName@": ["../@projectName@/src/index.ts"]
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath, URL } from 'node:url'
|
|
2
|
-
|
|
3
|
-
import { defineConfig } from 'vite'
|
|
4
|
-
import vue from '@vitejs/plugin-vue'
|
|
5
|
-
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
6
|
-
|
|
7
|
-
export default defineConfig(({ mode }) => ({
|
|
8
|
-
plugins: [
|
|
9
|
-
vue(),
|
|
10
|
-
vueDevTools()
|
|
11
|
-
],
|
|
12
|
-
resolve: {
|
|
13
|
-
alias: {
|
|
14
|
-
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
15
|
-
'@scopedPackageName@': fileURLToPath(new URL('../@projectName@/src/index.ts', import.meta.url))
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
define: {
|
|
20
|
-
__DEV__: JSON.stringify(mode !== 'production')
|
|
21
|
-
}
|
|
22
|
-
}))
|