create-lzcli 1.0.0

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.
Files changed (61) hide show
  1. package/index.html +12 -0
  2. package/index.js +104 -0
  3. package/package.json +30 -0
  4. package/readme.md +1 -0
  5. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/.env +2 -0
  6. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/.prettierrc +10 -0
  7. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/eslint.config.ts +80 -0
  8. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/index.html +26 -0
  9. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/package-lock.json +2936 -0
  10. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/package.json +44 -0
  11. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/App.vue +19 -0
  12. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/main.ts +13 -0
  13. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/store/index.ts +11 -0
  14. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/styles/index.css +1 -0
  15. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/vite-env.d.ts +10 -0
  16. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/tsconfig.json +43 -0
  17. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/tsconfig.node.json +18 -0
  18. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/vite.config.ts +27 -0
  19. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/.env +2 -0
  20. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/.prettierrc +10 -0
  21. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/eslint.config.ts +80 -0
  22. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/index.html +26 -0
  23. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/package-lock.json +3309 -0
  24. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/package.json +45 -0
  25. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/App.vue +26 -0
  26. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/main.ts +14 -0
  27. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/router/index.ts +19 -0
  28. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/store/index.ts +11 -0
  29. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/styles/index.css +1 -0
  30. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/view/HomeView.vue +7 -0
  31. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/vite-env.d.ts +10 -0
  32. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/tsconfig.json +43 -0
  33. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/tsconfig.node.json +18 -0
  34. package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/vite.config.ts +27 -0
  35. package/template/vue_ts_prettieric_pinia/.env +2 -0
  36. package/template/vue_ts_prettieric_pinia/.prettierrc +11 -0
  37. package/template/vue_ts_prettieric_pinia/index.html +26 -0
  38. package/template/vue_ts_prettieric_pinia/package-lock.json +1371 -0
  39. package/template/vue_ts_prettieric_pinia/package.json +36 -0
  40. package/template/vue_ts_prettieric_pinia/pnpm-lock.yaml +883 -0
  41. package/template/vue_ts_prettieric_pinia/src/App.vue +56 -0
  42. package/template/vue_ts_prettieric_pinia/src/main.ts +11 -0
  43. package/template/vue_ts_prettieric_pinia/src/store/counter.ts +12 -0
  44. package/template/vue_ts_prettieric_pinia/src/styles/index.css +1 -0
  45. package/template/vue_ts_prettieric_pinia/src/vite-env.d.ts +10 -0
  46. package/template/vue_ts_prettieric_pinia/tsconfig.json +42 -0
  47. package/template/vue_ts_prettieric_pinia/tsconfig.node.json +13 -0
  48. package/template/vue_ts_prettieric_pinia/vite.config.ts +25 -0
  49. package/template/vue_ts_prettieric_tailwindcss_pinia/.env +2 -0
  50. package/template/vue_ts_prettieric_tailwindcss_pinia/.prettierrc +11 -0
  51. package/template/vue_ts_prettieric_tailwindcss_pinia/index.html +26 -0
  52. package/template/vue_ts_prettieric_tailwindcss_pinia/package-lock.json +1661 -0
  53. package/template/vue_ts_prettieric_tailwindcss_pinia/package.json +39 -0
  54. package/template/vue_ts_prettieric_tailwindcss_pinia/src/App.vue +16 -0
  55. package/template/vue_ts_prettieric_tailwindcss_pinia/src/main.ts +10 -0
  56. package/template/vue_ts_prettieric_tailwindcss_pinia/src/store/counter.ts +14 -0
  57. package/template/vue_ts_prettieric_tailwindcss_pinia/src/styles/index.css +1 -0
  58. package/template/vue_ts_prettieric_tailwindcss_pinia/src/vite-env.d.ts +10 -0
  59. package/template/vue_ts_prettieric_tailwindcss_pinia/tsconfig.json +43 -0
  60. package/template/vue_ts_prettieric_tailwindcss_pinia/tsconfig.node.json +13 -0
  61. package/template/vue_ts_prettieric_tailwindcss_pinia/vite.config.ts +27 -0
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <div class="container">
3
+ <h1>✅ 手动搭建成功</h1>
4
+ <p class="desc">Vite + Vue3 + TypeScript + 组合式API</p>
5
+ <p class="count">当前计数:{{ counterStore.count }}</p>
6
+ <button @click="addCount" class="btn">点击 +1</button>
7
+ </div>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import { useCounterStore } from "@/store/counter"
12
+
13
+ const counterStore = useCounterStore()
14
+ console.log(counterStore);
15
+ const addCount = counterStore.increment
16
+
17
+ </script>
18
+
19
+ <style scoped>
20
+ .container {
21
+ max-width: 600px;
22
+ margin: 80px auto;
23
+ text-align: center;
24
+ font-family: Arial, sans-serif;
25
+ }
26
+
27
+ .desc {
28
+ color: #666;
29
+ font-size: 16px;
30
+ margin: 10px 0;
31
+ }
32
+
33
+
34
+ .count {
35
+ font-size: 24px;
36
+ font-weight: bold;
37
+ color: #333;
38
+ margin: 20px 0;
39
+ }
40
+
41
+
42
+ .btn {
43
+ padding: 12px 24px;
44
+ font-size: 16px;
45
+ background-color: #42b983;
46
+ color: white;
47
+ border: none;
48
+ border-radius: 6px;
49
+ cursor: pointer;
50
+ transition: background 0.3s;
51
+ }
52
+
53
+ .btn:hover {
54
+ background-color: #359469;
55
+ }
56
+ </style>
@@ -0,0 +1,11 @@
1
+ import { createApp } from "vue";
2
+ import App from "./App.vue";
3
+ import "./styles/index.css";
4
+
5
+ import { createPinia } from "pinia";
6
+ const pinia = createPinia();
7
+
8
+ const app = createApp(App);
9
+
10
+ app.use(pinia);
11
+ app.mount("#app");
@@ -0,0 +1,12 @@
1
+ import { defineStore } from 'pinia'
2
+
3
+ export const useCounterStore = defineStore('counter', {
4
+ state: () => ({
5
+ count: 0
6
+ }),
7
+ actions: {
8
+ increment() {
9
+ this.count++
10
+ }
11
+ }
12
+ })
@@ -0,0 +1 @@
1
+ @import "tailwindcss";
@@ -0,0 +1,10 @@
1
+ declare module "*.vue" {
2
+ import { defineComponent } from "vue";
3
+ const component: ReturnType<typeof defineComponent>;
4
+ export default component;
5
+ }
6
+
7
+ declare module "*.css" {
8
+ const content: Record<string, string>;
9
+ export default content;
10
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": [
7
+ "ES2020",
8
+ "DOM",
9
+ "DOM.Iterable"
10
+ ], // 编译目标
11
+ "skipLibCheck": true, // 跳过类型检查
12
+ "baseUrl": ".",
13
+ "paths": {
14
+ "@/*": [
15
+ "./src/*"
16
+ ]
17
+ },
18
+ "ignoreDeprecations": "6.0",
19
+ "moduleResolution": "bundler", // 模块解析策略
20
+ "allowImportingTsExtensions": true, // 允许导入.ts文件
21
+ "resolveJsonModule": true, // 允许导入.json文件
22
+ "isolatedModules": true, // 每个文件作为单独的模块进行编译
23
+ "noEmit": true, // 不生成输出文件
24
+ "jsx": "preserve", // 保留JSX语法
25
+ /* 严格类型检查 */
26
+ "strict": true, // 启用所有严格类型检查选项
27
+ "noUnusedLocals": true, // 不允许未使用的局部变量
28
+ "noUnusedParameters": true, // 不允许未使用的参数
29
+ "noFallthroughCasesInSwitch": true // 不允许switch语句中的case穿透
30
+ },
31
+ "include": [
32
+ "src/**/*.ts",
33
+ "src/**/*.d.ts",
34
+ "src/**/*.tsx",
35
+ "src/**/*.vue"
36
+ ], // 包含要编译的文件和类型定义文件
37
+ "references": [
38
+ {
39
+ "path": "./tsconfig.node.json"
40
+ }
41
+ ] // 包含要编译的文件和类型定义文件
42
+ }
@@ -0,0 +1,13 @@
1
+ // 给vite配置文件用
2
+ {
3
+ "compilerOptions": {
4
+ "composite": true,
5
+ "skipLibCheck": true,
6
+ "module": "esnext",
7
+ "moduleResolution": "bundler",
8
+ "allowSyntheticDefaultImports": true
9
+ },
10
+ "include": [
11
+ "vite.config.ts"
12
+ ]
13
+ }
@@ -0,0 +1,25 @@
1
+ import { defineConfig } from 'vite'
2
+ import vue from '@vitejs/plugin-vue'
3
+ import path from 'path'
4
+
5
+ export default defineConfig(
6
+ {
7
+ plugins: [
8
+ vue(),
9
+ ],
10
+ resolve: {
11
+ alias: {
12
+ '@': path.resolve(
13
+ __dirname,
14
+ './src'
15
+ ),
16
+ },
17
+ },
18
+ build: {},
19
+ server: {
20
+ port: 3334,
21
+ open: true,
22
+ host: '0.0.0.0',
23
+ },
24
+ }
25
+ )
@@ -0,0 +1,2 @@
1
+ # 项目名称(网页标题)
2
+ VITE_PROJECT_NAME=Vue 3 + TypeScript + ESLint �
@@ -0,0 +1,11 @@
1
+ {
2
+ "tabWidth": 80,
3
+ "printWidth": 10,
4
+ "singleQuote": true,
5
+ "semi": false,
6
+ "useTabs": true,
7
+ "bracketSpacing": true,
8
+ "embeddedLanguageFormatting": "auto",
9
+ "bracketSameLine": false,
10
+ "trailingComma": "es5"
11
+ }
@@ -0,0 +1,26 @@
1
+ <!doctype html>
2
+ <html
3
+ lang="en"
4
+ >
5
+ <head>
6
+ <meta
7
+ charset="UTF-8"
8
+ />
9
+ <meta
10
+ name="viewport"
11
+ content="width=device-width, initial-scale=1.0"
12
+ />
13
+ <title>
14
+ %VITE_PROJECT_NAME%
15
+ </title>
16
+ </head>
17
+ <body>
18
+ <div
19
+ id="app"
20
+ ></div>
21
+ </body>
22
+ <script
23
+ type="module"
24
+ src="/src/main.ts"
25
+ ></script>
26
+ </html>