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.
@@ -1,7 +1,3 @@
1
- <script setup lang="ts">
2
- import { RouterView } from "vue-router"
3
- </script>
4
-
5
1
  <template>
6
2
  <RouterView />
7
3
  </template>
@@ -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,4 +1,3 @@
1
- import { createApp } from "vue"
2
1
  import App from "./App.vue"
3
2
  import { setupBoot } from "./boot/index"
4
3
 
@@ -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: [vue(), vueJsx(), vueDevTools()],
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.1",
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
  }