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,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lowercode",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vue-tsc --noEmit && vite build",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"vue",
|
|
13
|
+
"cli",
|
|
14
|
+
"template",
|
|
15
|
+
"vue-router",
|
|
16
|
+
"sass",
|
|
17
|
+
"less",
|
|
18
|
+
"typescript",
|
|
19
|
+
"eslint",
|
|
20
|
+
"prettier",
|
|
21
|
+
"tailwindcss",
|
|
22
|
+
"vite"
|
|
23
|
+
],
|
|
24
|
+
"author": "a15173636319",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@eslint/js": "^10.0.1",
|
|
28
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
29
|
+
"eslint": "^10.1.0",
|
|
30
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
31
|
+
"globals": "^17.4.0",
|
|
32
|
+
"jiti": "^2.6.1",
|
|
33
|
+
"typescript": "^6.0.2",
|
|
34
|
+
"typescript-eslint": "^8.58.0",
|
|
35
|
+
"vite": "^8.0.3",
|
|
36
|
+
"vue-tsc": "^3.2.6"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
40
|
+
"pinia": "^3.0.4",
|
|
41
|
+
"tailwindcss": "^4.2.2",
|
|
42
|
+
"vue": "^3.5.31"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="max-w-xl mx-auto mt-20 text-center font-sans">
|
|
3
|
+
<h1 class="text-2xl font-bold text-gray-800">✅ 手动搭建成功</h1>
|
|
4
|
+
<p class="mt-2 text-gray-500">Vite + Vue3 + TypeScript + 组合式API</p>
|
|
5
|
+
<p class="mt-5 text-xl font-bold text-gray-800">当前计数:{{ counterStore.count }}</p>
|
|
6
|
+
<button @click="addCount"
|
|
7
|
+
class="mt-6 px-6 py-3 bg-emerald-500 text-white rounded-lg hover:bg-emerald-600 transition-colors">
|
|
8
|
+
点击 +1
|
|
9
|
+
</button>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { useCounterStore } from '@/store'
|
|
15
|
+
|
|
16
|
+
const counterStore = useCounterStore()
|
|
17
|
+
|
|
18
|
+
const addCount = counterStore.increment
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createApp } from "vue";
|
|
2
|
+
import App from "./App.vue";
|
|
3
|
+
import "@/styles/index.css"
|
|
4
|
+
import { createPinia } from "pinia"
|
|
5
|
+
|
|
6
|
+
import "@/store/index";
|
|
7
|
+
|
|
8
|
+
const app = createApp(App);
|
|
9
|
+
|
|
10
|
+
const pinia = createPinia();
|
|
11
|
+
app.use(pinia);
|
|
12
|
+
|
|
13
|
+
app.mount("#app");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
/* 模块解析 */
|
|
20
|
+
"moduleResolution": "bundler", // 模块解析策略
|
|
21
|
+
"allowImportingTsExtensions": true, // 允许导入.ts文件
|
|
22
|
+
"resolveJsonModule": true, // 允许导入.json文件
|
|
23
|
+
"isolatedModules": true, // 每个文件作为单独的模块进行编译
|
|
24
|
+
"noEmit": true, // 不生成输出文件
|
|
25
|
+
"jsx": "preserve", // 保留JSX语法
|
|
26
|
+
/* 严格类型检查 */
|
|
27
|
+
"strict": true, // 启用所有严格类型检查选项
|
|
28
|
+
"noUnusedLocals": true, // 不允许未使用的局部变量
|
|
29
|
+
"noUnusedParameters": true, // 不允许未使用的参数
|
|
30
|
+
"noFallthroughCasesInSwitch": true // 不允许switch语句中的case穿透
|
|
31
|
+
},
|
|
32
|
+
"include": [
|
|
33
|
+
"src/**/*.ts",
|
|
34
|
+
"src/**/*.d.ts",
|
|
35
|
+
"src/**/*.tsx",
|
|
36
|
+
"src/**/*.vue"
|
|
37
|
+
], // 包含要编译的文件和类型定义文件
|
|
38
|
+
"references": [
|
|
39
|
+
{
|
|
40
|
+
"path": "./tsconfig.node.json"
|
|
41
|
+
}
|
|
42
|
+
] // 包含要编译的文件和类型定义文件
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// 给vite配置文件用
|
|
2
|
+
{
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"composite": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"paths": {
|
|
10
|
+
"@": [
|
|
11
|
+
"./src/*"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"include": [
|
|
16
|
+
"vite.config.ts"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
+
import path from 'path'
|
|
5
|
+
|
|
6
|
+
export default defineConfig(
|
|
7
|
+
{
|
|
8
|
+
plugins: [
|
|
9
|
+
vue(),
|
|
10
|
+
tailwindcss(),
|
|
11
|
+
],
|
|
12
|
+
resolve: {
|
|
13
|
+
alias: {
|
|
14
|
+
'@': path.resolve(
|
|
15
|
+
__dirname,
|
|
16
|
+
'./src'
|
|
17
|
+
),
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
build: {},
|
|
21
|
+
server: {
|
|
22
|
+
port: 3334,
|
|
23
|
+
open: true,
|
|
24
|
+
host: '0.0.0.0',
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import tseslint from 'typescript-eslint'
|
|
4
|
+
import pluginVue from 'eslint-plugin-vue'
|
|
5
|
+
import { defineConfig } from 'eslint/config'
|
|
6
|
+
import ts from 'typescript'
|
|
7
|
+
|
|
8
|
+
export default defineConfig(
|
|
9
|
+
[
|
|
10
|
+
{
|
|
11
|
+
files: [
|
|
12
|
+
'**/*.{js,mjs,cjs,ts,mts,cts,vue}',
|
|
13
|
+
],
|
|
14
|
+
ignores: [
|
|
15
|
+
'node_modules/**',
|
|
16
|
+
'dist/**',
|
|
17
|
+
'*.config.{js,ts}',
|
|
18
|
+
'*.d.ts',
|
|
19
|
+
'*.css',
|
|
20
|
+
'*.scss',
|
|
21
|
+
'*.less',
|
|
22
|
+
'*.json',
|
|
23
|
+
'*.md',
|
|
24
|
+
'*.sass',
|
|
25
|
+
],
|
|
26
|
+
extends: [
|
|
27
|
+
'js/recommended',
|
|
28
|
+
],
|
|
29
|
+
languageOptions: {
|
|
30
|
+
globals: globals.browser,
|
|
31
|
+
},
|
|
32
|
+
rules: {
|
|
33
|
+
// 代码风格与错误检查
|
|
34
|
+
'no-console': 'warn', // 禁止 console,仅警告
|
|
35
|
+
'no-unused-vars': 'error', // 未使用变量报错
|
|
36
|
+
'prefer-const': 'error', // 优先使用 const
|
|
37
|
+
'no-var': 'error', // 禁止使用 var
|
|
38
|
+
'no-undef': 'warn', // 禁止使用未定义的变量
|
|
39
|
+
'no-debugger': 'warn', // 禁止使用 debugger,仅警告
|
|
40
|
+
'no-empty': 'warn', // 禁止空块,仅警告
|
|
41
|
+
'no-empty-function': 'warn', // 禁止空函数,仅警告
|
|
42
|
+
'no-multi-spaces': 'warn', // 禁止多余的空格,仅警告
|
|
43
|
+
'no-trailing-spaces': 'warn', // 禁止行尾空格,仅警告
|
|
44
|
+
'eol-last': [
|
|
45
|
+
'warn',
|
|
46
|
+
'always',
|
|
47
|
+
], // 文件末尾必须有换行符,仅警告
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
// 对于ts文件和vue文件,关闭 any 检查
|
|
51
|
+
{
|
|
52
|
+
files: [
|
|
53
|
+
'**/*.{ts,tsx,vue}',
|
|
54
|
+
],
|
|
55
|
+
rules: {
|
|
56
|
+
'@typescript-eslint/no-explicit-any': 'off', // 关闭 any 检查
|
|
57
|
+
'@typescript-eslint/no-unused-vars': 'warn', // 未使用变量报错
|
|
58
|
+
'@typescript-eslint/no-non-null-assertion': 'warn', // 关闭非空断言检查
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
tseslint
|
|
62
|
+
.configs
|
|
63
|
+
.recommended,
|
|
64
|
+
pluginVue
|
|
65
|
+
.configs[
|
|
66
|
+
'flat/essential'
|
|
67
|
+
],
|
|
68
|
+
// 针对vue文件,关闭组件命名规则检查
|
|
69
|
+
{
|
|
70
|
+
files: [
|
|
71
|
+
'**/*.vue',
|
|
72
|
+
],
|
|
73
|
+
rules: {
|
|
74
|
+
'vue/multi-word-component-names': 'warn', // 组件命名规则检查,警告级别
|
|
75
|
+
'vue/no-unused-components': 'warn', // 未使用组件检查,警告级别
|
|
76
|
+
'vue/no-unused-vars': 'warn', // 未使用变量检查,警告级别
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
]
|
|
80
|
+
)
|
|
@@ -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>
|