create-young-proj 2.0.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +39 -0
- package/README.md +7 -1
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
- package/src/index.ts +6 -1
- package/template-electron-win7/.vscode/extensions.json +5 -0
- package/template-electron-win7/.vscode/settings.json +49 -0
- package/template-electron-win7/README.md +65 -0
- package/template-electron-win7/RELEASE_NOTES.md +11 -0
- package/template-electron-win7/_gitignore +27 -0
- package/template-electron-win7/dev-app-update.yml +2 -0
- package/template-electron-win7/electron/config/0.local.config.ts +13 -0
- package/template-electron-win7/electron/config/1.dev.config.ts +13 -0
- package/template-electron-win7/electron/config/2.test.config.ts +13 -0
- package/template-electron-win7/electron/config/3.wtest.config.ts +13 -0
- package/template-electron-win7/electron/config/4.online.config.ts +13 -0
- package/template-electron-win7/electron/config.ts +13 -0
- package/template-electron-win7/electron/electron-env.d.ts +58 -0
- package/template-electron-win7/electron/main.ts +318 -0
- package/template-electron-win7/electron/preload.ts +23 -0
- package/template-electron-win7/electron/update.ts +78 -0
- package/template-electron-win7/electron-builder.yaml +67 -0
- package/template-electron-win7/env/.env +1 -0
- package/template-electron-win7/env/.env.development +9 -0
- package/template-electron-win7/env/.env.production +9 -0
- package/template-electron-win7/eslint.config.mjs +33 -0
- package/template-electron-win7/index.html +16 -0
- package/template-electron-win7/package.json +71 -0
- package/template-electron-win7/public/icon.ico +0 -0
- package/template-electron-win7/scripts/afterPack.mjs +36 -0
- package/template-electron-win7/scripts/build.mjs +55 -0
- package/template-electron-win7/src/App.vue +23 -0
- package/template-electron-win7/src/auto-imports.d.ts +305 -0
- package/template-electron-win7/src/components/UpdateDialog.vue +166 -0
- package/template-electron-win7/src/components.d.ts +18 -0
- package/template-electron-win7/src/layouts/blank.vue +11 -0
- package/template-electron-win7/src/layouts/default.vue +13 -0
- package/template-electron-win7/src/main.ts +36 -0
- package/template-electron-win7/src/modules/1-router.ts +72 -0
- package/template-electron-win7/src/modules/2-pinia.ts +13 -0
- package/template-electron-win7/src/styles/variables.scss +8 -0
- package/template-electron-win7/src/types/global.d.ts +0 -0
- package/template-electron-win7/src/utils/env.ts +4 -0
- package/template-electron-win7/src/utils/ls.ts +118 -0
- package/template-electron-win7/src/views/[...all_404].vue +539 -0
- package/template-electron-win7/src/views/index.vue +34 -0
- package/template-electron-win7/src/vite-env.d.ts +27 -0
- package/template-electron-win7/tsconfig.json +29 -0
- package/template-electron-win7/tsconfig.node.json +11 -0
- package/template-electron-win7/uno.config.ts +32 -0
- package/template-electron-win7/vite.config.ts +78 -0
- package/template-electron-win7/yarn.lock +5964 -0
- package/template-nuxt-admin/error.vue +3 -3
- package/template-nuxt-admin/nuxt.config.ts +20 -7
- package/template-nuxt-admin/package.json +5 -3
- package/template-nuxt-admin/yarn.lock +3438 -2586
- package/template-nuxt-website/app.vue +45 -1
- package/template-nuxt-website/layouts/default.vue +18 -16
- package/template-nuxt-website/layouts/home.vue +14 -12
- package/template-nuxt-website/layouts/tabbar.vue +18 -16
- package/template-nuxt-website/nuxt.config.ts +20 -5
- package/template-nuxt-website/package.json +2 -1
- package/template-nuxt-website/yarn.lock +4677 -3598
@@ -0,0 +1,78 @@
|
|
1
|
+
import path from 'node:path'
|
2
|
+
import { defineConfig } from 'vite'
|
3
|
+
import electron from 'vite-plugin-electron/simple'
|
4
|
+
import vue from '@vitejs/plugin-vue'
|
5
|
+
import vueJsx from '@vitejs/plugin-vue-jsx'
|
6
|
+
import Unocss from 'unocss/vite'
|
7
|
+
|
8
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
9
|
+
import Components from 'unplugin-vue-components/vite'
|
10
|
+
|
11
|
+
// 自动路由及布局
|
12
|
+
import Pages from 'vite-plugin-pages'
|
13
|
+
import Layouts from 'vite-plugin-vue-layouts'
|
14
|
+
// 自动处理 optimizeDeps 缓存
|
15
|
+
import OptimizationPersist from 'vite-plugin-optimize-persist'
|
16
|
+
import PkgConfig from 'vite-plugin-package-config'
|
17
|
+
|
18
|
+
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
19
|
+
|
20
|
+
// https://cn.vitejs.dev/config/
|
21
|
+
export default defineConfig({
|
22
|
+
envDir: path.resolve(__dirname, './env'),
|
23
|
+
resolve: {
|
24
|
+
alias: {
|
25
|
+
'@': path.resolve(__dirname, './src'),
|
26
|
+
},
|
27
|
+
},
|
28
|
+
plugins: [
|
29
|
+
vue(),
|
30
|
+
vueJsx(),
|
31
|
+
Pages({
|
32
|
+
extensions: ['vue', 'tsx'],
|
33
|
+
dirs: 'src/views',
|
34
|
+
exclude: ['**/components/*.{vue,tsx}', '_*'],
|
35
|
+
}),
|
36
|
+
Layouts({ defaultLayout: 'default' }),
|
37
|
+
electron({
|
38
|
+
main: {
|
39
|
+
// Shortcut of `build.lib.entry`.
|
40
|
+
entry: 'electron/main.ts',
|
41
|
+
},
|
42
|
+
preload: {
|
43
|
+
// Shortcut of `build.rollupOptions.input`.
|
44
|
+
// Preload scripts may contain Web assets, so use the `build.rollupOptions.input` instead `build.lib.entry`.
|
45
|
+
input: path.join(__dirname, 'electron/preload.ts'),
|
46
|
+
},
|
47
|
+
// Ployfill the Electron and Node.js API for Renderer process.
|
48
|
+
// If you want use Node.js in Renderer process, the `nodeIntegration` needs to be enabled in the Main process.
|
49
|
+
// See 👉 https://github.com/electron-vite/vite-plugin-electron-renderer
|
50
|
+
renderer: {},
|
51
|
+
}),
|
52
|
+
AutoImport({
|
53
|
+
resolvers: [
|
54
|
+
ElementPlusResolver(),
|
55
|
+
],
|
56
|
+
imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
|
57
|
+
dts: 'src/auto-imports.d.ts',
|
58
|
+
}),
|
59
|
+
Components({
|
60
|
+
resolvers: [
|
61
|
+
ElementPlusResolver(),
|
62
|
+
],
|
63
|
+
extensions: ['vue', 'tsx'],
|
64
|
+
dirs: ['src/components'],
|
65
|
+
dts: 'src/components.d.ts',
|
66
|
+
}),
|
67
|
+
Unocss(),
|
68
|
+
PkgConfig(),
|
69
|
+
OptimizationPersist(),
|
70
|
+
],
|
71
|
+
css: {
|
72
|
+
preprocessorOptions: {
|
73
|
+
scss: {
|
74
|
+
additionalData: `@use '@/styles/variables.scss' as *;`, // 引入全局变量文件
|
75
|
+
},
|
76
|
+
},
|
77
|
+
},
|
78
|
+
})
|