ljr-cli 1.0.1 → 1.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/lib/demo1.js +4 -1
- package/lib/demo2.js +3 -1
- package/lib/index.js +38 -1
- package/lib/templates/vue2.7.16/README.md +24 -8
- package/lib/templates/vue2.7.16/package.json +4 -0
- package/lib/templates/vue2.7.16/pnpm-lock.yaml +8171 -0
- package/lib/templates/vue3.5.25-2025.12.4/.vscode/settings.json +1 -1
- package/lib/templates/vue3.5.25-2025.12.4/README.md +26 -8
- package/lib/templates/vue3.5.25-2025.12.4/auto-imports.d.ts +78 -0
- package/lib/templates/vue3.5.25-2025.12.4/components.d.ts +28 -0
- package/lib/templates/vue3.5.25-2025.12.4/package.json +3 -0
- package/lib/templates/vue3.5.25-2025.12.4/pnpm-lock.yaml +3515 -0
- package/lib/templates/vue3.5.25-2025.12.4/src/App.vue +0 -4
- package/lib/templates/vue3.5.25-2025.12.4/src/boot/index.ts +0 -2
- package/lib/templates/vue3.5.25-2025.12.4/src/main.ts +0 -1
- package/lib/templates/vue3.5.25-2025.12.4/src/views/HomeView.vue +6 -0
- package/lib/templates/vue3.5.25-2025.12.4/tsconfig.app.json +2 -3
- package/lib/templates/vue3.5.25-2025.12.4/vite.config.ts +15 -1
- package/package.json +6 -1
- package/lib/templates/vue2.7.16/package-lock.json +0 -12422
- package/lib/templates/vue3.5.25-2025.12.4/package-lock.json +0 -5297
- package/lib/templates/vue3.5.25-2025.12.4/src/boot/element-plus.ts +0 -13
- package/lib/utils/date.js +0 -148
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"explorer.fileNesting.patterns": {
|
|
4
4
|
"tsconfig.json": "tsconfig.*.json, env.d.ts",
|
|
5
5
|
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
|
|
6
|
-
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig"
|
|
6
|
+
"package.json": "*.env, .env.*, env.d.ts, package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig, .gitignore, .gitattributes, index.html, .browserslistrc, babel.config.js, jsconfig.json, auto-imports.d.ts, components.d.ts"
|
|
7
7
|
},
|
|
8
8
|
"editor.codeActionsOnSave": {
|
|
9
9
|
"source.fixAll": "explicit"
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# vue3.5.25模版
|
|
2
2
|
|
|
3
3
|
2025.12.4创建的模版
|
|
4
|
-
|
|
4
|
+
全局引入 l-global 包,包括 variable.css、base.css、global.css 和 utils 工具类
|
|
5
|
+
使用 `unplugin-auto-import` 自动导入vue、vue-route
|
|
6
|
+
使用 `unplugin-auto-import` `unplugin-vue-components` 按需导入element-plus组件
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
项目内采用`unplugin-vue-router`插件,可无需钉子自动根据目录及文件命名规则,生成配置路由信息。
|
|
7
9
|
做了登录页,404 页
|
|
8
10
|
做了通过路由配置生成左侧菜单
|
|
9
11
|
使用 vuex-persist 插件做 vuex 持久化
|
|
@@ -33,34 +35,50 @@ axios 封装
|
|
|
33
35
|
├── package-lock.json
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
##
|
|
38
|
+
## 初始化(必须在当前根目录执行)
|
|
39
|
+
|
|
40
|
+
##### 此项目使用 pnpm 作为包管理工具
|
|
41
|
+
|
|
42
|
+
首次使用 corepack 需要先启用
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
corepack enable
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
使用最新版本 pnpm (需要更新最新版 pnpm 再使用)
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
corepack use pnpm@latest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
初始化依赖
|
|
37
55
|
|
|
38
56
|
```sh
|
|
39
|
-
|
|
57
|
+
pnpm install
|
|
40
58
|
```
|
|
41
59
|
|
|
42
60
|
### 编译和热重载开发
|
|
43
61
|
|
|
44
62
|
```sh
|
|
45
|
-
|
|
63
|
+
pnpm run dev || pnpm run serve
|
|
46
64
|
```
|
|
47
65
|
|
|
48
66
|
### 为生产进行类型检查、编译和最小化
|
|
49
67
|
|
|
50
68
|
```sh
|
|
51
|
-
|
|
69
|
+
pnpm run build
|
|
52
70
|
```
|
|
53
71
|
|
|
54
72
|
### eslint检查
|
|
55
73
|
|
|
56
74
|
```sh
|
|
57
|
-
|
|
75
|
+
pnpm run lint
|
|
58
76
|
```
|
|
59
77
|
|
|
60
78
|
### prettier格式化
|
|
61
79
|
|
|
62
80
|
```sh
|
|
63
|
-
|
|
81
|
+
pnpm run format
|
|
64
82
|
```
|
|
65
83
|
|
|
66
84
|
### 命名规范
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
// noinspection JSUnusedGlobalSymbols
|
|
5
|
+
// Generated by unplugin-auto-import
|
|
6
|
+
// biome-ignore lint: disable
|
|
7
|
+
export {}
|
|
8
|
+
declare global {
|
|
9
|
+
const EffectScope: typeof import('vue').EffectScope
|
|
10
|
+
const computed: typeof import('vue').computed
|
|
11
|
+
const createApp: typeof import('vue').createApp
|
|
12
|
+
const customRef: typeof import('vue').customRef
|
|
13
|
+
const defineAsyncComponent: typeof import('vue').defineAsyncComponent
|
|
14
|
+
const defineComponent: typeof import('vue').defineComponent
|
|
15
|
+
const effectScope: typeof import('vue').effectScope
|
|
16
|
+
const getCurrentInstance: typeof import('vue').getCurrentInstance
|
|
17
|
+
const getCurrentScope: typeof import('vue').getCurrentScope
|
|
18
|
+
const getCurrentWatcher: typeof import('vue').getCurrentWatcher
|
|
19
|
+
const h: typeof import('vue').h
|
|
20
|
+
const inject: typeof import('vue').inject
|
|
21
|
+
const isProxy: typeof import('vue').isProxy
|
|
22
|
+
const isReactive: typeof import('vue').isReactive
|
|
23
|
+
const isReadonly: typeof import('vue').isReadonly
|
|
24
|
+
const isRef: typeof import('vue').isRef
|
|
25
|
+
const isShallow: typeof import('vue').isShallow
|
|
26
|
+
const markRaw: typeof import('vue').markRaw
|
|
27
|
+
const nextTick: typeof import('vue').nextTick
|
|
28
|
+
const onActivated: typeof import('vue').onActivated
|
|
29
|
+
const onBeforeMount: typeof import('vue').onBeforeMount
|
|
30
|
+
const onBeforeRouteLeave: typeof import('vue-router').onBeforeRouteLeave
|
|
31
|
+
const onBeforeRouteUpdate: typeof import('vue-router').onBeforeRouteUpdate
|
|
32
|
+
const onBeforeUnmount: typeof import('vue').onBeforeUnmount
|
|
33
|
+
const onBeforeUpdate: typeof import('vue').onBeforeUpdate
|
|
34
|
+
const onDeactivated: typeof import('vue').onDeactivated
|
|
35
|
+
const onErrorCaptured: typeof import('vue').onErrorCaptured
|
|
36
|
+
const onMounted: typeof import('vue').onMounted
|
|
37
|
+
const onRenderTracked: typeof import('vue').onRenderTracked
|
|
38
|
+
const onRenderTriggered: typeof import('vue').onRenderTriggered
|
|
39
|
+
const onScopeDispose: typeof import('vue').onScopeDispose
|
|
40
|
+
const onServerPrefetch: typeof import('vue').onServerPrefetch
|
|
41
|
+
const onUnmounted: typeof import('vue').onUnmounted
|
|
42
|
+
const onUpdated: typeof import('vue').onUpdated
|
|
43
|
+
const onWatcherCleanup: typeof import('vue').onWatcherCleanup
|
|
44
|
+
const provide: typeof import('vue').provide
|
|
45
|
+
const reactive: typeof import('vue').reactive
|
|
46
|
+
const readonly: typeof import('vue').readonly
|
|
47
|
+
const ref: typeof import('vue').ref
|
|
48
|
+
const resolveComponent: typeof import('vue').resolveComponent
|
|
49
|
+
const shallowReactive: typeof import('vue').shallowReactive
|
|
50
|
+
const shallowReadonly: typeof import('vue').shallowReadonly
|
|
51
|
+
const shallowRef: typeof import('vue').shallowRef
|
|
52
|
+
const toRaw: typeof import('vue').toRaw
|
|
53
|
+
const toRef: typeof import('vue').toRef
|
|
54
|
+
const toRefs: typeof import('vue').toRefs
|
|
55
|
+
const toValue: typeof import('vue').toValue
|
|
56
|
+
const triggerRef: typeof import('vue').triggerRef
|
|
57
|
+
const unref: typeof import('vue').unref
|
|
58
|
+
const useAttrs: typeof import('vue').useAttrs
|
|
59
|
+
const useCssModule: typeof import('vue').useCssModule
|
|
60
|
+
const useCssVars: typeof import('vue').useCssVars
|
|
61
|
+
const useId: typeof import('vue').useId
|
|
62
|
+
const useLink: typeof import('vue-router').useLink
|
|
63
|
+
const useModel: typeof import('vue').useModel
|
|
64
|
+
const useRoute: typeof import('vue-router').useRoute
|
|
65
|
+
const useRouter: typeof import('vue-router').useRouter
|
|
66
|
+
const useSlots: typeof import('vue').useSlots
|
|
67
|
+
const useTemplateRef: typeof import('vue').useTemplateRef
|
|
68
|
+
const watch: typeof import('vue').watch
|
|
69
|
+
const watchEffect: typeof import('vue').watchEffect
|
|
70
|
+
const watchPostEffect: typeof import('vue').watchPostEffect
|
|
71
|
+
const watchSyncEffect: typeof import('vue').watchSyncEffect
|
|
72
|
+
}
|
|
73
|
+
// for type re-export
|
|
74
|
+
declare global {
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
|
77
|
+
import('vue')
|
|
78
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// biome-ignore lint: disable
|
|
4
|
+
// oxlint-disable
|
|
5
|
+
// ------
|
|
6
|
+
// Generated by unplugin-vue-components
|
|
7
|
+
// Read more: https://github.com/vuejs/core/pull/3399
|
|
8
|
+
import { GlobalComponents } from 'vue'
|
|
9
|
+
|
|
10
|
+
export {}
|
|
11
|
+
|
|
12
|
+
/* prettier-ignore */
|
|
13
|
+
declare module 'vue' {
|
|
14
|
+
export interface GlobalComponents {
|
|
15
|
+
ElButton: typeof import('element-plus/es')['ElButton']
|
|
16
|
+
ElInput: typeof import('element-plus/es')['ElInput']
|
|
17
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
|
18
|
+
RouterView: typeof import('vue-router')['RouterView']
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// For TSX support
|
|
23
|
+
declare global {
|
|
24
|
+
const ElButton: typeof import('element-plus/es')['ElButton']
|
|
25
|
+
const ElInput: typeof import('element-plus/es')['ElInput']
|
|
26
|
+
const RouterLink: typeof import('vue-router')['RouterLink']
|
|
27
|
+
const RouterView: typeof import('vue-router')['RouterView']
|
|
28
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@10.27.0",
|
|
6
7
|
"engines": {
|
|
7
8
|
"node": "^20.19.0 || >=22.12.0"
|
|
8
9
|
},
|
|
@@ -37,6 +38,8 @@
|
|
|
37
38
|
"npm-run-all2": "^8.0.4",
|
|
38
39
|
"prettier": "3.6.2",
|
|
39
40
|
"typescript": "~5.9.0",
|
|
41
|
+
"unplugin-auto-import": "^20.3.0",
|
|
42
|
+
"unplugin-vue-components": "^30.0.0",
|
|
40
43
|
"vite": "^7.2.4",
|
|
41
44
|
"vite-plugin-vue-devtools": "^8.0.5",
|
|
42
45
|
"vue-tsc": "^3.1.5"
|