create-lik-app 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.mjs +73 -73
- package/package.json +7 -9
- package/templates/.gitignore +1 -0
- package/templates/template-react/_gitignore +3 -0
- package/templates/template-react/env/.env +0 -0
- package/templates/template-react/env/.env.development +1 -0
- package/templates/template-react/env/.env.production +1 -0
- package/templates/template-react/eslint.config.mjs +1 -1
- package/templates/template-react/package.json +1 -0
- package/templates/template-react/plugins/index.ts +24 -0
- package/templates/template-react/src/main.tsx +1 -1
- package/templates/template-react/src/store/index.ts +1 -2
- package/templates/template-react/src/styles/main.css +10 -0
- package/templates/template-react/src/views/Home/components/React/index.tsx +3 -3
- package/templates/template-react/src/views/Home/index.tsx +7 -1
- package/templates/template-react/tsconfig.app.json +1 -1
- package/templates/template-react/tsconfig.node.json +6 -1
- package/templates/template-react/types/auto-imports.d.ts +47 -0
- package/templates/template-react/types/vite-env.d.ts +9 -0
- package/templates/template-react/vite.config.ts +6 -16
- package/templates/template-react-tanstack-jotai/.husky/commit-msg +6 -0
- package/templates/template-react-tanstack-jotai/.husky/lintstagedrc.cjs +8 -0
- package/templates/template-react-tanstack-jotai/.husky/pre-commit +10 -0
- package/templates/template-react-tanstack-jotai/.prettierignore +13 -0
- package/templates/template-react-tanstack-jotai/.vscode/extensions.json +5 -0
- package/templates/template-react-tanstack-jotai/README.md +40 -0
- package/templates/template-react-tanstack-jotai/_gitignore +27 -0
- package/templates/template-react-tanstack-jotai/commitlint.config.mjs +28 -0
- package/templates/template-react-tanstack-jotai/config/uno/rules.ts +127 -0
- package/templates/template-react-tanstack-jotai/env/.env +0 -0
- package/templates/template-react-tanstack-jotai/env/.env.development +1 -0
- package/templates/template-react-tanstack-jotai/env/.env.production +1 -0
- package/templates/template-react-tanstack-jotai/eslint.config.mjs +44 -0
- package/templates/template-react-tanstack-jotai/index.html +13 -0
- package/templates/template-react-tanstack-jotai/package.json +51 -0
- package/templates/template-react-tanstack-jotai/plugins/index.ts +26 -0
- package/templates/template-react-tanstack-jotai/prettier.config.mjs +11 -0
- package/templates/template-react-tanstack-jotai/public/lic.svg +1263 -0
- package/templates/template-react-tanstack-jotai/public/react.svg +1 -0
- package/templates/template-react-tanstack-jotai/public/vite.svg +1 -0
- package/templates/template-react-tanstack-jotai/src/assets/react.svg +1 -0
- package/templates/template-react-tanstack-jotai/src/components/Lic/index.tsx +12 -0
- package/templates/template-react-tanstack-jotai/src/libs/gsap/index.ts +6 -0
- package/templates/template-react-tanstack-jotai/src/main.tsx +23 -0
- package/templates/template-react-tanstack-jotai/src/routeTree.gen.ts +145 -0
- package/templates/template-react-tanstack-jotai/src/routes/__root.tsx +11 -0
- package/templates/template-react-tanstack-jotai/src/routes/_layout/about.tsx +6 -0
- package/templates/template-react-tanstack-jotai/src/routes/_layout/index.tsx +6 -0
- package/templates/template-react-tanstack-jotai/src/routes/_layout.tsx +23 -0
- package/templates/template-react-tanstack-jotai/src/store/index.ts +1 -0
- package/templates/template-react-tanstack-jotai/src/store/module/favorite.ts +5 -0
- package/templates/template-react-tanstack-jotai/src/styles/animation.css +8 -0
- package/templates/template-react-tanstack-jotai/src/styles/variable.css +21 -0
- package/templates/template-react-tanstack-jotai/src/types/color.d.ts +1 -0
- package/templates/template-react-tanstack-jotai/src/utils/rainbow-print.ts +10 -0
- package/templates/template-react-tanstack-jotai/src/views/404/index.tsx +18 -0
- package/templates/template-react-tanstack-jotai/src/views/About/index.tsx +7 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/Button/index.tsx +24 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/React/index.tsx +18 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/Vite/index.tsx +20 -0
- package/templates/template-react-tanstack-jotai/src/views/Index/index.tsx +50 -0
- package/templates/template-react-tanstack-jotai/tsconfig.app.json +36 -0
- package/templates/template-react-tanstack-jotai/tsconfig.json +7 -0
- package/templates/template-react-tanstack-jotai/tsconfig.node.json +29 -0
- package/templates/template-react-tanstack-jotai/types/auto-imports.d.ts +47 -0
- package/templates/template-react-tanstack-jotai/types/vite-env.d.ts +9 -0
- package/templates/template-react-tanstack-jotai/uno.config.ts +40 -0
- package/templates/template-react-tanstack-jotai/vite.config.ts +18 -0
- package/templates/template-vue/.husky/commit-msg +1 -0
- package/templates/template-vue/.husky/lintstagedrc.cjs +15 -0
- package/templates/template-vue/.husky/pre-commit +10 -0
- package/templates/template-vue/.prettierrc.json +6 -0
- package/templates/template-vue/.vscode/extensions.json +8 -0
- package/templates/template-vue/README.md +39 -0
- package/templates/template-vue/_gitignore +33 -0
- package/templates/template-vue/commitlint.config.mjs +33 -0
- package/templates/template-vue/env/.env +0 -0
- package/templates/template-vue/env/.env.development +0 -0
- package/templates/template-vue/env/.env.production +0 -0
- package/templates/template-vue/env/.env.test +1 -0
- package/templates/template-vue/eslint.config.js +24 -0
- package/templates/template-vue/index.html +13 -0
- package/templates/template-vue/package.json +45 -0
- package/templates/template-vue/plugins/index.ts +28 -0
- package/templates/template-vue/public/lic.svg +1263 -0
- package/templates/template-vue/src/App.vue +87 -0
- package/templates/template-vue/src/assets/base.css +86 -0
- package/templates/template-vue/src/assets/logo.svg +1 -0
- package/templates/template-vue/src/assets/main.css +35 -0
- package/templates/template-vue/src/components/HelloWorld.vue +43 -0
- package/templates/template-vue/src/components/TheWelcome.vue +121 -0
- package/templates/template-vue/src/components/WelcomeItem.vue +87 -0
- package/templates/template-vue/src/components/icons/IconCommunity.vue +12 -0
- package/templates/template-vue/src/components/icons/IconDocumentation.vue +12 -0
- package/templates/template-vue/src/components/icons/IconEcosystem.vue +12 -0
- package/templates/template-vue/src/components/icons/IconSupport.vue +12 -0
- package/templates/template-vue/src/components/icons/IconTooling.vue +19 -0
- package/templates/template-vue/src/main.ts +14 -0
- package/templates/template-vue/src/router/index.ts +23 -0
- package/templates/template-vue/src/stores/index.ts +8 -0
- package/templates/template-vue/src/stores/module/counter.ts +12 -0
- package/templates/template-vue/src/views/AboutView.vue +15 -0
- package/templates/template-vue/src/views/HomeView.vue +7 -0
- package/templates/template-vue/tsconfig.app.json +13 -0
- package/templates/template-vue/tsconfig.json +11 -0
- package/templates/template-vue/tsconfig.node.json +19 -0
- package/templates/template-vue/types/auto-imports.d.ts +309 -0
- package/templates/template-vue/types/components.d.ts +21 -0
- package/templates/template-vue/types/env.d.ts +9 -0
- package/templates/template-vue/vite.config.ts +16 -0
- package/templates/template-react/src/store/module/counter.ts +0 -20
- package/templates/template-react/src/vite-env.d.ts +0 -1
- /package/templates/{template-react/src/styles/mian.css → template-react-tanstack-jotai/src/styles/main.css} +0 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
import { defineConfig } from 'vite';
|
2
|
+
|
3
|
+
import path from 'node:path';
|
4
|
+
import process from 'node:process';
|
5
|
+
import { createPlugins } from './plugins';
|
6
|
+
|
7
|
+
// https://vite.dev/config/
|
8
|
+
export default defineConfig(() => ({
|
9
|
+
plugins: createPlugins(),
|
10
|
+
resolve: {
|
11
|
+
alias: {
|
12
|
+
'@': path.resolve(process.cwd(), 'src')
|
13
|
+
}
|
14
|
+
},
|
15
|
+
server: {
|
16
|
+
port: 8220
|
17
|
+
}
|
18
|
+
}));
|
@@ -0,0 +1 @@
|
|
1
|
+
npx --no -- commitlint --edit $1
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module.exports = {
|
2
|
+
'*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
|
3
|
+
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [
|
4
|
+
'prettier --parser json --write',
|
5
|
+
],
|
6
|
+
'*.vue': [
|
7
|
+
'eslint --fix',
|
8
|
+
'prettier --write',
|
9
|
+
// 'stylelint --fix'
|
10
|
+
],
|
11
|
+
'package.json': ['prettier --write'],
|
12
|
+
// '*.{scss,less,styl,css,html}': ['stylelint --fix', 'prettier --write'],
|
13
|
+
'*.md': ['prettier --write'],
|
14
|
+
'*.hbs': ['prettier --write'],
|
15
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# template-vue
|
2
|
+
|
3
|
+
This template should help get you started developing with Vue 3 in Vite.
|
4
|
+
|
5
|
+
## Recommended IDE Setup
|
6
|
+
|
7
|
+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
8
|
+
|
9
|
+
## Type Support for `.vue` Imports in TS
|
10
|
+
|
11
|
+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
12
|
+
|
13
|
+
## Customize configuration
|
14
|
+
|
15
|
+
See [Vite Configuration Reference](https://vite.dev/config/).
|
16
|
+
|
17
|
+
## Project Setup
|
18
|
+
|
19
|
+
```sh
|
20
|
+
pnpm install
|
21
|
+
```
|
22
|
+
|
23
|
+
### Compile and Hot-Reload for Development
|
24
|
+
|
25
|
+
```sh
|
26
|
+
pnpm dev
|
27
|
+
```
|
28
|
+
|
29
|
+
### Type-Check, Compile and Minify for Production
|
30
|
+
|
31
|
+
```sh
|
32
|
+
pnpm build
|
33
|
+
```
|
34
|
+
|
35
|
+
### Lint with [ESLint](https://eslint.org/)
|
36
|
+
|
37
|
+
```sh
|
38
|
+
pnpm lint
|
39
|
+
```
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Logs
|
2
|
+
logs
|
3
|
+
*.log
|
4
|
+
npm-debug.log*
|
5
|
+
yarn-debug.log*
|
6
|
+
yarn-error.log*
|
7
|
+
pnpm-debug.log*
|
8
|
+
lerna-debug.log*
|
9
|
+
|
10
|
+
node_modules
|
11
|
+
.DS_Store
|
12
|
+
dist
|
13
|
+
dist-ssr
|
14
|
+
coverage
|
15
|
+
*.local
|
16
|
+
|
17
|
+
/cypress/videos/
|
18
|
+
/cypress/screenshots/
|
19
|
+
|
20
|
+
# Editor directories and files
|
21
|
+
.vscode/*
|
22
|
+
!.vscode/extensions.json
|
23
|
+
.idea
|
24
|
+
*.suo
|
25
|
+
*.ntvs*
|
26
|
+
*.njsproj
|
27
|
+
*.sln
|
28
|
+
*.sw?
|
29
|
+
|
30
|
+
*.tsbuildinfo
|
31
|
+
|
32
|
+
# types
|
33
|
+
types/auto-imports.d.ts
|
@@ -0,0 +1,33 @@
|
|
1
|
+
export default {
|
2
|
+
extends: ['@commitlint/config-conventional'],
|
3
|
+
rules: {
|
4
|
+
'type-enum': [
|
5
|
+
// 确保提交信息的类型必须是预定义的类型之一。
|
6
|
+
2, // 错误级别,2 表示严重错误,提交将被拒绝。
|
7
|
+
'always', // 始终应用此规则。
|
8
|
+
[
|
9
|
+
'feat', // 新功能(feature)
|
10
|
+
'fix', // 修补bug
|
11
|
+
'docs', // 文档(documentation)
|
12
|
+
'style', // 格式、样式(不影响代码运行的变动)
|
13
|
+
'refactor', // 重构(即不是新增功能,也不是修改BUG的代码)
|
14
|
+
'perf', // 优化相关,比如提升性能、体验
|
15
|
+
'test', // 添加测试
|
16
|
+
'ci', // 持续集成修改
|
17
|
+
'chore', // 构建过程或辅助工具的变动
|
18
|
+
'revert', // 回滚到上一个版本
|
19
|
+
'workflow', // 工作流改进
|
20
|
+
'mod', // 不确定分类的修改
|
21
|
+
'wip', // 开发中
|
22
|
+
'types', // 类型修改
|
23
|
+
'release', // 版本发布
|
24
|
+
],
|
25
|
+
],
|
26
|
+
'subject-full-stop': [
|
27
|
+
// 确保提交信息的 subject 部分不以句点(.)结尾。
|
28
|
+
0, // 错误级别,0 表示忽略此规则,不进行检查。
|
29
|
+
'never', // 从不应用此规则。
|
30
|
+
],
|
31
|
+
'subject-case': [0, 'never'], // 确保提交信息的 subject 部分不强制特定的大小写格式。
|
32
|
+
},
|
33
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import pluginVue from 'eslint-plugin-vue'
|
2
|
+
import vueTsEslintConfig from '@vue/eslint-config-typescript'
|
3
|
+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
4
|
+
|
5
|
+
export default [
|
6
|
+
{
|
7
|
+
name: 'lint',
|
8
|
+
files: ['**/*.{ts,mts,tsx,vue}'],
|
9
|
+
},
|
10
|
+
|
11
|
+
{
|
12
|
+
name: 'lint-ignore',
|
13
|
+
ignores: ['**/dist/**', 'node_modules', '**/dist-ssr/**', '**/coverage/**'],
|
14
|
+
},
|
15
|
+
{
|
16
|
+
name: 'lint-rules',
|
17
|
+
rules: {
|
18
|
+
'@typescript-eslint/consistent-type-imports': 'error', // 要求 import type
|
19
|
+
},
|
20
|
+
},
|
21
|
+
...pluginVue.configs['flat/essential'],
|
22
|
+
...vueTsEslintConfig(),
|
23
|
+
skipFormatting,
|
24
|
+
]
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<link rel="icon" href="/lic.svg" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
|
+
<title>Lik-Vue-App</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div id="app"></div>
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{
|
2
|
+
"name": "template-vue",
|
3
|
+
"version": "0.0.0",
|
4
|
+
"private": true,
|
5
|
+
"type": "module",
|
6
|
+
"scripts": {
|
7
|
+
"dev": "vite",
|
8
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
9
|
+
"preview": "vite preview",
|
10
|
+
"build-only": "vite build",
|
11
|
+
"type-check": "vue-tsc --build",
|
12
|
+
"lint": "lint-staged -c ./.husky/lintstagedrc.cjs",
|
13
|
+
"prepare": "husky install"
|
14
|
+
},
|
15
|
+
"dependencies": {
|
16
|
+
"@vueuse/core": "^12.0.0",
|
17
|
+
"pinia": "^2.2.6",
|
18
|
+
"vue": "^3.5.13",
|
19
|
+
"vue-router": "^4.4.5"
|
20
|
+
},
|
21
|
+
"devDependencies": {
|
22
|
+
"@commitlint/cli": "^19.6.0",
|
23
|
+
"@commitlint/config-conventional": "^19.6.0",
|
24
|
+
"@tsconfig/node22": "^22.0.0",
|
25
|
+
"@types/node": "^22.9.3",
|
26
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
27
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
28
|
+
"@vue/eslint-config-prettier": "^10.1.0",
|
29
|
+
"@vue/eslint-config-typescript": "^14.1.3",
|
30
|
+
"@vue/tsconfig": "^0.7.0",
|
31
|
+
"eslint": "^9.14.0",
|
32
|
+
"eslint-plugin-vue": "^9.30.0",
|
33
|
+
"husky": "^9.1.7",
|
34
|
+
"lint-staged": "^15.2.10",
|
35
|
+
"npm-run-all2": "^7.0.1",
|
36
|
+
"pinia-plugin-persistedstate": "^4.1.3",
|
37
|
+
"prettier": "^3.3.3",
|
38
|
+
"typescript": "~5.6.3",
|
39
|
+
"unplugin-auto-import": "^0.18.6",
|
40
|
+
"unplugin-vue-components": "^0.27.5",
|
41
|
+
"vite": "^6.0.1",
|
42
|
+
"vite-plugin-vue-devtools": "^7.6.5",
|
43
|
+
"vue-tsc": "^2.1.10"
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import vue from '@vitejs/plugin-vue'
|
2
|
+
import vueJsx from '@vitejs/plugin-vue-jsx'
|
3
|
+
import vueDevTools from 'vite-plugin-vue-devtools'
|
4
|
+
import AutoImport from 'unplugin-auto-import/vite'
|
5
|
+
import Components from 'unplugin-vue-components/vite'
|
6
|
+
export const createPlugins = () => [
|
7
|
+
vue(),
|
8
|
+
vueJsx(),
|
9
|
+
vueDevTools(),
|
10
|
+
AutoImport({
|
11
|
+
include: [
|
12
|
+
/\.vue$/,
|
13
|
+
/\.vue\?vue/, // .vue
|
14
|
+
],
|
15
|
+
imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
|
16
|
+
// 为true时在项目根目录自动创建
|
17
|
+
dts: 'types/auto-imports.d.ts',
|
18
|
+
}),
|
19
|
+
// 按需加载组件
|
20
|
+
Components({
|
21
|
+
// 自动加载的组件目录,默认值为 ['src/components']
|
22
|
+
dirs: ['src/components'],
|
23
|
+
// 组件名称包含目录,防止同名组件冲突
|
24
|
+
directoryAsNamespace: true,
|
25
|
+
// 指定类型声明文件,为true时在项目根目录创建
|
26
|
+
dts: 'types/components.d.ts',
|
27
|
+
}),
|
28
|
+
]
|