@tomjs/create-app 5.4.0 → 5.5.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.
Files changed (29) hide show
  1. package/package.json +8 -8
  2. package/templates/config/base/package.json +2 -2
  3. package/templates/config/package.json +16 -16
  4. package/templates/config/vscode/_.gitignore +4 -0
  5. package/templates/config/vue/_.gitignore +63 -0
  6. package/templates/config/vue/package.json +1 -1
  7. package/templates/config/vue/tsconfig.app.json +0 -1
  8. package/templates/config/vue/uno.config.ts +2 -2
  9. package/templates/electron-vue/package.json +1 -1
  10. package/templates/electron-vue/src/components/HelloWorld.vue +0 -1
  11. package/templates/electron-vue/src/main.ts +2 -2
  12. package/templates/electron-vue/tsconfig.app.json +5 -8
  13. package/templates/electron-vue/tsconfig.node.json +1 -1
  14. package/templates/electron-vue/vite.config.ts +5 -2
  15. package/templates/hbuilderx-vue/src/components/HelloWorld.vue +0 -2
  16. package/templates/hbuilderx-vue/src/main.ts +3 -2
  17. package/templates/hbuilderx-vue/tsconfig.app.json +0 -1
  18. package/templates/hbuilderx-vue/vite.config.ts +5 -2
  19. package/templates/vscode-vue/src/App.vue +0 -1
  20. package/templates/vscode-vue/src/main.ts +3 -1
  21. package/templates/vscode-vue/src/style.scss +0 -0
  22. package/templates/vscode-vue/vite.config.ts +5 -2
  23. package/templates/web-vue/src/components/HelloWorld.vue +0 -2
  24. package/templates/web-vue/src/main.ts +2 -1
  25. package/templates/web-vue/vite.config.ts +5 -2
  26. package/templates/electron-vue/src/vite-env.d.ts +0 -1
  27. /package/templates/config/vue/{env.d.ts → src/env.d.ts} +0 -0
  28. /package/templates/electron-vue/src/{style.css → style.scss} +0 -0
  29. /package/templates/hbuilderx-vue/src/{style.css → style.scss} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tomjs/create-app",
3
3
  "type": "module",
4
- "version": "5.4.0",
4
+ "version": "5.5.0",
5
5
  "description": "Create a node/web/electron/vscode project based on tomjs",
6
6
  "author": {
7
7
  "name": "Tom Gao",
@@ -47,22 +47,22 @@
47
47
  "node": ">=18"
48
48
  },
49
49
  "dependencies": {
50
- "@clack/prompts": "^0.11.0",
50
+ "@clack/prompts": "^1.0.0",
51
51
  "@tomjs/logger": "^3.0.0",
52
52
  "@tomjs/node": "^2.2.3",
53
53
  "chalk": "^5.6.2",
54
54
  "dayjs": "^1.11.19",
55
55
  "execa": "^9.6.1",
56
- "lodash-es": "^4.17.22",
56
+ "lodash-es": "^4.17.23",
57
57
  "meow": "^14.0.0",
58
58
  "tinyglobby": "^0.2.15"
59
59
  },
60
60
  "devDependencies": {
61
- "@antfu/eslint-config": "^7.1.0",
61
+ "@antfu/eslint-config": "^7.2.0",
62
62
  "@commitlint/cli": "^20.3.1",
63
63
  "@tomjs/commitlint": "^5.0.0",
64
64
  "@tomjs/eslint": "^7.0.0",
65
- "@tomjs/stylelint": "^8.0.0",
65
+ "@tomjs/stylelint": "^8.1.0",
66
66
  "@tomjs/tsconfig": "^3.2.0",
67
67
  "@tsconfig/node20": "^20.1.8",
68
68
  "@types/lodash-es": "^4.17.12",
@@ -71,13 +71,13 @@
71
71
  "eslint": "^9.39.2",
72
72
  "lint-staged": "^16.2.7",
73
73
  "npm-run-all2": "^8.0.4",
74
- "publint": "^0.3.16",
74
+ "publint": "^0.3.17",
75
75
  "rimraf": "^6.1.2",
76
76
  "simple-git-hooks": "^2.13.1",
77
77
  "stylelint": "^17.0.0",
78
- "tsdown": "~0.19.0",
78
+ "tsdown": "~0.20.1",
79
79
  "tsx": "^4.21.0",
80
- "type-fest": "^5.4.1",
80
+ "type-fest": "^5.4.2",
81
81
  "typescript": "~5.9.3"
82
82
  },
83
83
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "version": "0.0.0",
4
- "packageManager": "pnpm@10.28.1",
4
+ "packageManager": "pnpm@10.28.2",
5
5
  "scripts": {
6
6
  "lint": "eslint --fix",
7
7
  "prepare": "simple-git-hooks"
@@ -10,7 +10,7 @@
10
10
  "dayjs": "^1.11.19"
11
11
  },
12
12
  "devDependencies": {
13
- "@antfu/eslint-config": "^7.1.0",
13
+ "@antfu/eslint-config": "^7.2.0",
14
14
  "@commitlint/cli": "^20.3.1",
15
15
  "@tomjs/commitlint": "^5.0.0",
16
16
  "@tomjs/eslint": "^7.0.0",
@@ -1,25 +1,25 @@
1
1
  {
2
2
  "dependencies": {
3
- "@antfu/eslint-config": "^7.1.0",
4
- "@clack/prompts": "^0.11.0",
5
- "@commitlint/cli": "^20.3.1",
6
- "@eslint-react/eslint-plugin": "^2.7.2",
3
+ "@antfu/eslint-config": "^7.2.0",
4
+ "@clack/prompts": "^1.0.0",
5
+ "@commitlint/cli": "^20.4.0",
6
+ "@eslint-react/eslint-plugin": "^2.8.1",
7
7
  "@tomjs/commitlint": "^5.0.0",
8
8
  "@tomjs/eslint": "^7.0.0",
9
9
  "@tomjs/hbuilderx": "^1.2.0",
10
10
  "@tomjs/hbuilderx-cli": "^1.3.1",
11
11
  "@tomjs/logger": "^3.0.0",
12
12
  "@tomjs/node": "^2.2.3",
13
- "@tomjs/stylelint": "^8.0.0",
13
+ "@tomjs/stylelint": "^8.1.0",
14
14
  "@tomjs/tsconfig": "^3.2.0",
15
15
  "@tomjs/vite-plugin-electron": "^2.4.2",
16
16
  "@tomjs/vite-plugin-hbuilderx": "^1.3.0",
17
- "@tomjs/vite-plugin-vscode": "^7.1.0",
17
+ "@tomjs/vite-plugin-vscode": "^7.1.1",
18
18
  "@tomjs/vscode": "^2.5.0",
19
19
  "@tomjs/vscode-dev": "^3.1.2",
20
20
  "@tomjs/vscode-webview": "^2.0.2",
21
21
  "@types/node": "^20.19.30",
22
- "@types/react": "^19.2.9",
22
+ "@types/react": "^19.2.10",
23
23
  "@types/react-dom": "^19.2.3",
24
24
  "@types/vscode": "^1.56.0",
25
25
  "@types/vscode-webview": "^1.57.5",
@@ -34,7 +34,7 @@
34
34
  "cosmiconfig": "^9.0.0",
35
35
  "cross-env": "^10.1.0",
36
36
  "dayjs": "^1.11.19",
37
- "electron": "^40.0.0",
37
+ "electron": "^40.1.0",
38
38
  "electron-builder": "^26.4.0",
39
39
  "eslint": "^9.39.2",
40
40
  "eslint-plugin-react-hooks": "^7.0.1",
@@ -43,15 +43,15 @@
43
43
  "lint-staged": "^16.2.7",
44
44
  "meow": "^14.0.0",
45
45
  "npm-run-all2": "^8.0.4",
46
- "ora": "^9.0.0",
46
+ "ora": "^9.1.0",
47
47
  "pinia": "^3.0.4",
48
- "publint": "0.3.16",
49
- "react": "^19.2.3",
50
- "react-dom": "^19.2.3",
51
- "sass": "^1.97.2",
48
+ "publint": "0.3.17",
49
+ "react": "^19.2.4",
50
+ "react-dom": "^19.2.4",
51
+ "sass": "^1.97.3",
52
52
  "simple-git-hooks": "^2.13.1",
53
53
  "stylelint": "^17.0.0",
54
- "tsdown": "^0.19.0",
54
+ "tsdown": "^0.20.1",
55
55
  "tsx": "^4.21.0",
56
56
  "typescript": "~5.9.3",
57
57
  "unocss": "^66.6.0",
@@ -62,7 +62,7 @@
62
62
  "vite-plugin-vue-devtools": "^8.0.5",
63
63
  "vue": "^3.5.27",
64
64
  "vue-i18n": "^11.2.8",
65
- "vue-router": "^4.6.4",
66
- "vue-tsc": "^3.2.2"
65
+ "vue-router": "^5.0.1",
66
+ "vue-tsc": "^3.2.4"
67
67
  }
68
68
  }
@@ -60,6 +60,10 @@ build
60
60
  dist
61
61
  release
62
62
 
63
+ # generated files
64
+ auto-imports.d.ts
65
+ components.d.ts
66
+
63
67
  package.nls.json
64
68
  package.nls.*.json
65
69
  src/vscode.d.ts
@@ -0,0 +1,63 @@
1
+ # logs
2
+ *.log
3
+ lerna-debug.log*
4
+ logs
5
+ npm-debug.log*
6
+ pnpm-debug.log*
7
+ yarn-debug.log*
8
+ yarn-error.log*
9
+
10
+ # diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # runtime data
14
+ *.pid
15
+ *.pid.lock
16
+ *.seed
17
+ pids
18
+
19
+ # dependency directory
20
+ bower_components
21
+ jspm_packages
22
+ node_modules
23
+ web_modules
24
+
25
+ # cache
26
+ .cache
27
+ .npm
28
+ .tmp
29
+ .temp
30
+ .eslintcache
31
+ .stylelintcache
32
+ tsconfig.tsbuildinfo
33
+
34
+ # environment
35
+ .env
36
+
37
+ # macOS
38
+ .DS_Store
39
+
40
+ # package files
41
+ *.7z
42
+ *.gz
43
+ *.gzip
44
+ *.rar
45
+ *.tar
46
+ *.tar.*
47
+ *.tgz
48
+ *.zip
49
+
50
+ # IDEA
51
+ .idea
52
+
53
+ # vscode
54
+ .history
55
+
56
+ # build output
57
+ build
58
+ dist
59
+ release
60
+
61
+ # generated files
62
+ auto-imports.d.ts
63
+ components.d.ts
@@ -12,6 +12,6 @@
12
12
  "unplugin-vue-components": "^31.0.0",
13
13
  "vite": "^7.3.1",
14
14
  "vite-plugin-vue-devtools": "^8.0.5",
15
- "vue-tsc": "^3.2.2"
15
+ "vue-tsc": "^3.2.4"
16
16
  }
17
17
  }
@@ -7,7 +7,6 @@
7
7
  }
8
8
  },
9
9
  "include": [
10
- "env.d.ts",
11
10
  "src/**/*",
12
11
  "src/**/*.vue"
13
12
  ]
@@ -1,8 +1,8 @@
1
- import { defineConfig, presetAttributify, presetIcons, presetWind4 } from 'unocss';
1
+ import { defineConfig, presetAttributify, presetIcons, presetWind3 } from 'unocss';
2
2
 
3
3
  export default defineConfig({
4
4
  presets: [
5
- presetWind4(),
5
+ presetWind3(),
6
6
  presetAttributify(),
7
7
  presetIcons({ warn: true }),
8
8
  ],
@@ -13,6 +13,6 @@
13
13
  "release": "vue-tsc --noEmit && cross-env VITE_ELECTRON_BUILDER=1 vite build"
14
14
  },
15
15
  "dependencies": {
16
- "vue-router": "^4.6.4"
16
+ "vue-router": "^5.0.1"
17
17
  }
18
18
  }
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import os from 'node:os';
3
- import { ref } from 'vue';
4
3
 
5
4
  defineProps<{ msg: string }>();
6
5
 
@@ -1,6 +1,6 @@
1
- import { createApp } from 'vue';
2
1
  import App from './App.vue';
3
2
 
4
- import './style.css';
3
+ import 'virtual:uno.css';
4
+ import './style.scss';
5
5
 
6
6
  createApp(App).mount('#app');
@@ -2,15 +2,12 @@
2
2
  "extends": "@tomjs/tsconfig/vue.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "types": [
6
- "vite/client",
7
- "node"
8
- ]
5
+ "paths": {
6
+ "@/*": ["./src/*"]
7
+ }
9
8
  },
10
9
  "include": [
11
- "src/**/*.ts",
12
- "src/**/*.tsx",
13
- "src/**/*.vue",
14
- "src/**/*.d.ts"
10
+ "src/**/*",
11
+ "src/**/*.vue"
15
12
  ]
16
13
  }
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "include": [
7
7
  "@tomjs/vite-plugin-electron/env",
8
- "../config/electron/electron",
8
+ "electron",
9
9
  "*.config.ts"
10
10
  ]
11
11
  }
@@ -17,9 +17,12 @@ export default defineConfig({
17
17
  plugins: [
18
18
  vue(),
19
19
  AutoImport({
20
- imports: ['vue', 'vue-router'],
20
+ dts: './src/auto-imports.d.ts',
21
+ imports: ['vue', 'vue-router', '@vueuse/core'],
22
+ }),
23
+ Components({
24
+ dts: './src/components.d.ts',
21
25
  }),
22
- Components(),
23
26
  UnoCSS(),
24
27
  renderer(),
25
28
  electron({ builder: true }),
@@ -1,6 +1,4 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue';
3
-
4
2
  defineProps<{ msg: string }>();
5
3
 
6
4
  const count = ref(0);
@@ -1,5 +1,6 @@
1
- import { createApp } from 'vue';
2
1
  import App from './App.vue';
3
- import './style.css';
2
+
3
+ import 'virtual:uno.css';
4
+ import './style.scss';
4
5
 
5
6
  createApp(App).mount('#app');
@@ -11,7 +11,6 @@
11
11
  ]
12
12
  },
13
13
  "include": [
14
- "env.d.ts",
15
14
  "src/**/*",
16
15
  "src/**/*.vue"
17
16
  ]
@@ -21,9 +21,12 @@ export default defineConfig({
21
21
  plugins: [
22
22
  vue(),
23
23
  AutoImport({
24
- imports: ['vue'],
24
+ dts: './src/auto-imports.d.ts',
25
+ imports: ['vue', '@vueuse/core'],
26
+ }),
27
+ Components({
28
+ dts: './src/components.d.ts',
25
29
  }),
26
- Components(),
27
30
  hbuilderx(),
28
31
  UnoCSS(),
29
32
  devtools(),
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import { allComponents, provideVSCodeDesignSystem } from '@vscode/webview-ui-toolkit';
3
- import { ref } from 'vue';
4
3
  import { vscode } from './utils';
5
4
 
6
5
  provideVSCodeDesignSystem().register(allComponents);
@@ -1,4 +1,6 @@
1
- import { createApp } from 'vue';
2
1
  import App from './App.vue';
3
2
 
3
+ import 'virtual:uno.css';
4
+ import './style.scss';
5
+
4
6
  createApp(App).mount('#app');
File without changes
@@ -28,9 +28,12 @@ export default defineConfig(() => {
28
28
  },
29
29
  }),
30
30
  AutoImport({
31
- imports: ['vue'],
31
+ dts: './src/auto-imports.d.ts',
32
+ imports: ['vue', '@vueuse/core'],
33
+ }),
34
+ Components({
35
+ dts: './src/components.d.ts',
32
36
  }),
33
- Components(),
34
37
  UnoCSS(),
35
38
  vscode(),
36
39
  devtools(),
@@ -1,6 +1,4 @@
1
1
  <script setup lang="ts">
2
- import { ref } from 'vue';
3
-
4
2
  defineProps<{ msg: string }>();
5
3
 
6
4
  const count = ref(0);
@@ -1,5 +1,6 @@
1
- import { createApp } from 'vue';
2
1
  import App from './App.vue';
2
+
3
+ import 'virtual:uno.css';
3
4
  import './style.scss';
4
5
 
5
6
  createApp(App).mount('#app');
@@ -16,9 +16,12 @@ export default defineConfig({
16
16
  plugins: [
17
17
  vue(),
18
18
  AutoImport({
19
- imports: ['vue', 'vue-router'],
19
+ dts: './src/auto-imports.d.ts',
20
+ imports: ['vue', 'vue-router', '@vueuse/core'],
21
+ }),
22
+ Components({
23
+ dts: './src/components.d.ts',
20
24
  }),
21
- Components(),
22
25
  UnoCSS(),
23
26
  devtools(),
24
27
  ],
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
File without changes