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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { App } from "vue"
|
|
2
2
|
import { setupStyle } from "./style"
|
|
3
|
-
import { setupElementPlus } from "./element-plus"
|
|
4
3
|
import { setupRouter } from "./router"
|
|
5
4
|
import { setupPinia } from "./pinia"
|
|
6
5
|
|
|
@@ -10,7 +9,6 @@ import { setupPinia } from "./pinia"
|
|
|
10
9
|
*/
|
|
11
10
|
export function setupBoot(app: App<Element>) {
|
|
12
11
|
setupStyle(app)
|
|
13
|
-
setupElementPlus(app)
|
|
14
12
|
setupRouter(app)
|
|
15
13
|
setupPinia(app)
|
|
16
14
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const temp = ref("111")
|
|
3
|
+
</script>
|
|
4
|
+
|
|
1
5
|
<template>
|
|
2
6
|
<main>
|
|
3
7
|
<div>主页</div>
|
|
8
|
+
<div>{{ temp }}</div>
|
|
4
9
|
<div>
|
|
5
10
|
<el-button type="primary">Primary</el-button>
|
|
11
|
+
<el-input v-model="temp"></el-input>
|
|
6
12
|
</div>
|
|
7
13
|
</main>
|
|
8
14
|
</template>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
-
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue", "components.d.ts", "auto-imports.d.ts"],
|
|
4
4
|
"exclude": ["src/**/__tests__/*"],
|
|
5
5
|
"compilerOptions": {
|
|
6
6
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
7
7
|
|
|
8
8
|
"paths": {
|
|
9
9
|
"@/*": ["./src/*"]
|
|
10
|
-
}
|
|
11
|
-
"types": ["element-plus/global"]
|
|
10
|
+
}
|
|
12
11
|
}
|
|
13
12
|
}
|
|
@@ -4,11 +4,25 @@ import { defineConfig } from "vite"
|
|
|
4
4
|
import vue from "@vitejs/plugin-vue"
|
|
5
5
|
import vueJsx from "@vitejs/plugin-vue-jsx"
|
|
6
6
|
import vueDevTools from "vite-plugin-vue-devtools"
|
|
7
|
+
import ViteAutoImport from "unplugin-auto-import/vite"
|
|
8
|
+
import Components from "unplugin-vue-components/vite"
|
|
9
|
+
import { ElementPlusResolver } from "unplugin-vue-components/resolvers"
|
|
7
10
|
|
|
8
11
|
// https://vite.dev/config/
|
|
9
12
|
export default defineConfig({
|
|
10
13
|
base: "./", // 公共路径
|
|
11
|
-
plugins: [
|
|
14
|
+
plugins: [
|
|
15
|
+
vue(),
|
|
16
|
+
vueJsx(),
|
|
17
|
+
vueDevTools(),
|
|
18
|
+
ViteAutoImport({
|
|
19
|
+
imports: ["vue", "vue-router"],
|
|
20
|
+
resolvers: [ElementPlusResolver()],
|
|
21
|
+
}),
|
|
22
|
+
Components({
|
|
23
|
+
resolvers: [ElementPlusResolver()],
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
12
26
|
resolve: {
|
|
13
27
|
alias: {
|
|
14
28
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ljr-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"packageManager": "pnpm@10.27.0",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
10
|
+
},
|
|
7
11
|
"bin": {
|
|
8
12
|
"ljr": "lib/index.js",
|
|
9
13
|
"ljr-cli": "lib/index.js",
|
|
@@ -22,6 +26,7 @@
|
|
|
22
26
|
"download-git-repo": "^3.0.2",
|
|
23
27
|
"fs-extra": "^11.3.3",
|
|
24
28
|
"gradient-string": "^3.0.0",
|
|
29
|
+
"l-global": "^1.0.2",
|
|
25
30
|
"replace-in-file": "^8.4.0"
|
|
26
31
|
}
|
|
27
32
|
}
|