create-young-proj 1.2.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +61 -0
- package/README.md +6 -1
- package/dist/index.mjs +12 -12
- package/package.json +1 -1
- package/src/index.ts +6 -1
- package/template-nuxt-admin/env.d.ts +19 -1
- package/template-nuxt-admin/nuxt.config.ts +4 -2
- package/template-nuxt-admin/server/plugins/env.ts +0 -1
- package/template-nuxt-website/README.md +4 -0
- package/template-nuxt-website/composables/utils.ts +0 -4
- package/template-nuxt-website/env.d.ts +18 -1
- package/template-nuxt-website/nuxt.config.ts +3 -2
- package/template-nuxt-website/package.json +4 -5
- package/template-nuxt-website/server/api/get_footer_info.get.ts +3 -3
- package/template-nuxt-website/server/api/get_gray_status.get.ts +1 -0
- package/template-nuxt-website/server/api/get_head_nav.get.ts +1 -1
- package/template-nuxt-website/server/api/get_home_banner.get.ts +2 -2
- package/template-nuxt-website/server/routes/get/env.ts +13 -0
- package/template-nuxt-website/yarn.lock +1173 -1599
- package/template-uni-app/.vscode/vue-html.code-snippets +2 -7
- package/template-uni-app/README.md +2 -0
- package/template-uni-app/_env +1 -1
- package/template-uni-app/auto-imports.d.ts +718 -1
- package/template-uni-app/custom-plugins/multiconf.ts +13 -2
- package/template-uni-app/eslint.config.js +3 -1
- package/template-uni-app/package.json +11 -9
- package/template-uni-app/pnpm-lock.yaml +531 -866
- package/template-uni-app/src/manifest.json +1 -1
- package/template-uni-app/src/pages/index.vue +12 -9
- package/template-uni-app/src/pages/my.vue +6 -9
- package/template-uni-app/src/pages.json +1 -1
- package/template-uni-app/uni-pages.d.ts +24 -0
- package/template-uni-app/vite.config.ts +6 -3
- package/template-vitepress/.vitepress/components/HomePage.vue +54 -0
- package/template-vitepress/.vitepress/components/TodoItem.vue +16 -0
- package/template-vitepress/.vitepress/components.d.ts +13 -0
- package/template-vitepress/.vitepress/config.mts +159 -0
- package/template-vitepress/.vitepress/theme/index.ts +26 -0
- package/template-vitepress/.vitepress/theme/style.css +139 -0
- package/template-vitepress/Dockerfile +41 -0
- package/template-vitepress/README.md +102 -0
- package/template-vitepress/_gitignore +6 -0
- package/template-vitepress/_npmrc +2 -0
- package/template-vitepress/_nvmrc +1 -0
- package/template-vitepress/boot.mjs +17 -0
- package/template-vitepress/index.md +53 -0
- package/template-vitepress/nitro.config.ts +19 -0
- package/template-vitepress/package.json +26 -0
- package/template-vitepress/plugins/init.ts +204 -0
- package/template-vitepress/tsconfig.json +3 -0
- package/template-vitepress/vite.config.ts +66 -0
- package/template-uni-app/.eslintignore +0 -1
- package/template-uni-app/.eslintrc +0 -16
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-07-19 14:32:45
|
4
|
-
* @LastEditTime: 2023-
|
4
|
+
* @LastEditTime: 2023-11-16 09:57:41
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
7
|
import type { Plugin } from 'vite'
|
@@ -21,7 +21,7 @@ export function multiConf(env: string) {
|
|
21
21
|
configEnv = config.env as ImportMetaEnv
|
22
22
|
},
|
23
23
|
generateBundle(options, bundle) {
|
24
|
-
const appid = configEnv.
|
24
|
+
const appid = configEnv.VITE_APPID
|
25
25
|
const json = bundle['project.config.json'] as OutputAsset
|
26
26
|
if (json?.source && typeof json.source === 'string') {
|
27
27
|
const jsonConf = JSON.parse(json.source)
|
@@ -69,6 +69,17 @@ export function multiConf(env: string) {
|
|
69
69
|
json.source = JSON.stringify(jsonConf, null, 2)
|
70
70
|
// console.log("🚀 ~ file: multiconf.ts:72 ~ generateBundle ~ jsonConf:", jsonConf);
|
71
71
|
}
|
72
|
+
|
73
|
+
const app = bundle['app.json'] as OutputAsset
|
74
|
+
if (app?.source && typeof app.source === 'string') {
|
75
|
+
const appConf = JSON.parse(app.source)
|
76
|
+
// 隐私权限校验
|
77
|
+
appConf.__usePrivacyCheck__ = true
|
78
|
+
// 微信官方的组件懒加载 2.11.1+
|
79
|
+
appConf.lazyCodeLoading = 'requiredComponents'
|
80
|
+
|
81
|
+
app.source = JSON.stringify(appConf, null, 2)
|
82
|
+
}
|
72
83
|
},
|
73
84
|
} as Plugin
|
74
85
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: zhangyang
|
3
3
|
* @Date: 2023-11-01 10:13:50
|
4
|
-
* @LastEditTime: 2023-11-
|
4
|
+
* @LastEditTime: 2023-11-13 09:47:21
|
5
5
|
* @Description:
|
6
6
|
*/
|
7
7
|
import antfu from '@antfu/eslint-config'
|
@@ -25,11 +25,13 @@ export default antfu({
|
|
25
25
|
'no-throw-literal': 'off',
|
26
26
|
'antfu/consistent-list-newline': 'off',
|
27
27
|
'style/jsx-indent': 'off',
|
28
|
+
'style/no-tabs': 'off',
|
28
29
|
'prefer-promise-reject-errors': 'off',
|
29
30
|
'no-async-promise-executor': 'off',
|
30
31
|
},
|
31
32
|
}, {
|
32
33
|
ignores: [
|
33
34
|
'src/uni_modules',
|
35
|
+
'src/*.json',
|
34
36
|
],
|
35
37
|
})
|
@@ -60,7 +60,9 @@
|
|
60
60
|
"@dcloudio/uni-mp-toutiao": "3.0.0-3080720230703001",
|
61
61
|
"@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
|
62
62
|
"@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
|
63
|
-
"
|
63
|
+
"@uni-helper/uni-use": "^0.17.1",
|
64
|
+
"@vueuse/core": "9",
|
65
|
+
"dayjs": "^1.11.10",
|
64
66
|
"js-base64": "^3.7.5",
|
65
67
|
"lodash": "^4.17.21",
|
66
68
|
"md5": "^2.3.0",
|
@@ -69,21 +71,21 @@
|
|
69
71
|
"pinia": "2.0.35",
|
70
72
|
"sass": "^1.69.5",
|
71
73
|
"sass-loader": "^13.3.2",
|
72
|
-
"swiper": "^11.0.
|
74
|
+
"swiper": "^11.0.4",
|
73
75
|
"tnuiv3p-tn-sign-board": "^1.0.2",
|
74
76
|
"vue": "^3.3.8"
|
75
77
|
},
|
76
78
|
"devDependencies": {
|
77
|
-
"@antfu/eslint-config": "^1.1.
|
79
|
+
"@antfu/eslint-config": "^1.1.2",
|
78
80
|
"@dcloudio/types": "^3.4.3",
|
79
81
|
"@dcloudio/uni-automator": "3.0.0-3080720230703001",
|
80
82
|
"@dcloudio/uni-cli-shared": "3.0.0-3080720230703001",
|
81
83
|
"@dcloudio/uni-stacktracey": "3.0.0-3080720230703001",
|
82
84
|
"@dcloudio/uni-ui": "^1.4.28",
|
83
85
|
"@dcloudio/vite-plugin-uni": "3.0.0-3080720230703001",
|
84
|
-
"@types/md5": "^2.3.
|
85
|
-
"@uni-helper/pages-json-schema": "^0.2.
|
86
|
-
"@uni-helper/uni-app-types": "^0.5.
|
86
|
+
"@types/md5": "^2.3.5",
|
87
|
+
"@uni-helper/pages-json-schema": "^0.2.12",
|
88
|
+
"@uni-helper/uni-app-types": "^0.5.8",
|
87
89
|
"@uni-helper/uni-ui-types": "^0.5.11",
|
88
90
|
"@uni-helper/vite-plugin-uni-layouts": "^0.1.6",
|
89
91
|
"@uni-helper/vite-plugin-uni-manifest": "^0.2.3",
|
@@ -91,11 +93,11 @@
|
|
91
93
|
"@uni-helper/volar-service-uni-pages": "^0.2.12",
|
92
94
|
"@vue/tsconfig": "^0.4.0",
|
93
95
|
"eslint": "^8.53.0",
|
94
|
-
"lint-staged": "^15.0
|
96
|
+
"lint-staged": "^15.1.0",
|
95
97
|
"simple-git-hooks": "^2.9.0",
|
96
98
|
"typescript": "^5.2.2",
|
97
|
-
"unocss": "^0.57.
|
98
|
-
"unocss-preset-weapp": "^0.57.
|
99
|
+
"unocss": "^0.57.4",
|
100
|
+
"unocss-preset-weapp": "^0.57.1",
|
99
101
|
"unplugin-auto-import": "^0.16.7",
|
100
102
|
"unplugin-vue-components": "^0.25.2",
|
101
103
|
"vite": "4.5.0"
|