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.
- package/index.html +12 -0
- package/index.js +104 -0
- package/package.json +30 -0
- package/readme.md +1 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/.env +2 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/.prettierrc +10 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/eslint.config.ts +80 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/index.html +26 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/package-lock.json +2936 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/package.json +44 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/App.vue +19 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/main.ts +13 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/store/index.ts +11 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/styles/index.css +1 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/src/vite-env.d.ts +10 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/tsconfig.json +43 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/tsconfig.node.json +18 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia/vite.config.ts +27 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/.env +2 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/.prettierrc +10 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/eslint.config.ts +80 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/index.html +26 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/package-lock.json +3309 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/package.json +45 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/App.vue +26 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/main.ts +14 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/router/index.ts +19 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/store/index.ts +11 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/styles/index.css +1 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/view/HomeView.vue +7 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/src/vite-env.d.ts +10 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/tsconfig.json +43 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/tsconfig.node.json +18 -0
- package/template/vue_ts_eslint_prettieric_tailwindcss_pinia_vueRouter/vite.config.ts +27 -0
- package/template/vue_ts_prettieric_pinia/.env +2 -0
- package/template/vue_ts_prettieric_pinia/.prettierrc +11 -0
- package/template/vue_ts_prettieric_pinia/index.html +26 -0
- package/template/vue_ts_prettieric_pinia/package-lock.json +1371 -0
- package/template/vue_ts_prettieric_pinia/package.json +36 -0
- package/template/vue_ts_prettieric_pinia/pnpm-lock.yaml +883 -0
- package/template/vue_ts_prettieric_pinia/src/App.vue +56 -0
- package/template/vue_ts_prettieric_pinia/src/main.ts +11 -0
- package/template/vue_ts_prettieric_pinia/src/store/counter.ts +12 -0
- package/template/vue_ts_prettieric_pinia/src/styles/index.css +1 -0
- package/template/vue_ts_prettieric_pinia/src/vite-env.d.ts +10 -0
- package/template/vue_ts_prettieric_pinia/tsconfig.json +42 -0
- package/template/vue_ts_prettieric_pinia/tsconfig.node.json +13 -0
- package/template/vue_ts_prettieric_pinia/vite.config.ts +25 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/.env +2 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/.prettierrc +11 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/index.html +26 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/package-lock.json +1661 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/package.json +39 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/src/App.vue +16 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/src/main.ts +10 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/src/store/counter.ts +14 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/src/styles/index.css +1 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/src/vite-env.d.ts +10 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/tsconfig.json +43 -0
- package/template/vue_ts_prettieric_tailwindcss_pinia/tsconfig.node.json +13 -0
- 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 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
@@ -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,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,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>
|