create-lik-app 1.2.3 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.mjs +50 -50
- package/package.json +1 -1
- package/templates/template-react/eslint.config.mjs +32 -14
- package/templates/template-react/package.json +1 -1
- package/templates/template-react-tanstack-jotai/eslint.config.mjs +32 -14
- package/templates/template-react-tanstack-jotai/package.json +1 -1
- package/templates/template-react-tanstack-jotai-tailwindcss/.husky/commit-msg +6 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/.husky/lintstagedrc.cjs +8 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/.husky/pre-commit +10 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/.prettierignore +13 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/.vscode/extensions.json +5 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/README.md +40 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/_gitignore +27 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/commitlint.config.mjs +28 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/config/build/_base.ts +36 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/config/build/development.ts +7 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/config/build/production.ts +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/config/build/test.ts +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/env/.env +0 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/env/.env.development +2 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/env/.env.production +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/eslint.config.mjs +62 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/index.html +13 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/package.json +50 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/postcss.config.js +6 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/prettier.config.mjs +11 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/public/lic.svg +1263 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/public/react.svg +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/public/vite.svg +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/assets/react.svg +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/components/Lic/index.tsx +12 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/main.tsx +21 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/routeTree.gen.ts +145 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/routes/__root.tsx +11 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/routes/_layout/about.tsx +6 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/routes/_layout/index.tsx +6 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/routes/_layout.tsx +23 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/store/index.ts +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/store/module/favorite.ts +5 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/styles/animation.css +8 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/styles/main.css +11 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/styles/tailwind.css +30 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/styles/variable.css +21 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/types/auto-imports.d.ts +33 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/types/color.d.ts +1 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/utils/rainbow-print.ts +10 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/views/404/index.tsx +18 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/views/About/index.tsx +7 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/views/Index/Button/index.tsx +24 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/views/Index/React/index.tsx +18 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/views/Index/Vite/index.tsx +20 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/src/views/Index/index.tsx +50 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/tailwind.config.js +8 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/tsconfig.app.json +36 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/tsconfig.json +7 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/tsconfig.node.json +24 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/types/vite-env.d.ts +10 -0
- package/templates/template-react-tanstack-jotai-tailwindcss/vite.config.ts +15 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/.husky/commit-msg +6 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/.husky/lintstagedrc.cjs +8 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/.husky/pre-commit +10 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/.prettierignore +13 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/.vscode/extensions.json +5 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/README.md +40 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/_gitignore +27 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/commitlint.config.mjs +28 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/config/build/_base.ts +36 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/config/build/development.ts +7 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/config/build/production.ts +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/config/build/test.ts +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/env/.env +0 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/env/.env.development +2 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/env/.env.production +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/eslint.config.mjs +62 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/index.html +13 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/package.json +50 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/postcss.config.js +6 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/prettier.config.mjs +11 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/public/lic.svg +1263 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/public/react.svg +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/public/vite.svg +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/assets/react.svg +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/components/Lic/index.tsx +12 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/main.tsx +21 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/routeTree.gen.ts +145 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/routes/__root.tsx +11 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/routes/_layout/about.tsx +6 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/routes/_layout/index.tsx +6 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/routes/_layout.tsx +23 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/store/index.ts +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/store/module/favorite.ts +5 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/styles/animation.css +8 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/styles/main.css +11 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/styles/tailwind.css +30 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/styles/variable.css +21 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/types/auto-imports.d.ts +33 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/types/color.d.ts +1 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/utils/rainbow-print.ts +10 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/views/404/index.tsx +18 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/views/About/index.tsx +7 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/views/Index/Button/index.tsx +24 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/views/Index/React/index.tsx +18 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/views/Index/Vite/index.tsx +20 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/src/views/Index/index.tsx +50 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/tailwind.config.js +8 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/tsconfig.app.json +36 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/tsconfig.json +7 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/tsconfig.node.json +24 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/types/vite-env.d.ts +10 -0
- package/templates/template-react18-tanstack-jotai-tailwindcss/vite.config.ts +15 -0
- package/templates/template-vue/eslint.config.js +59 -21
- package/templates/template-vue/package.json +2 -2
@@ -0,0 +1,8 @@
|
|
1
|
+
module.exports = {
|
2
|
+
'*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
|
3
|
+
'{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --parser json --write'],
|
4
|
+
'package.json': ['prettier --write'],
|
5
|
+
// '*.{scss,less,styl,css,html}': ['stylelint --fix', 'prettier --write'],
|
6
|
+
'*.md': ['prettier --write'],
|
7
|
+
'*.hbs': ['prettier --write']
|
8
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Lic-Blog
|
2
|
+
|
3
|
+
## @/components
|
4
|
+
|
5
|
+
the common components / pages components
|
6
|
+
|
7
|
+
### Naming
|
8
|
+
|
9
|
+
**common components**
|
10
|
+
|
11
|
+
dirname start with lower case
|
12
|
+
|
13
|
+
**views components**
|
14
|
+
|
15
|
+
- in the views directory
|
16
|
+
- dirname start with upper case
|
17
|
+
- correspondence to the layout route name
|
18
|
+
|
19
|
+
## commit standard
|
20
|
+
|
21
|
+
### lint
|
22
|
+
|
23
|
+
- eslint
|
24
|
+
- prettier
|
25
|
+
- lint-staged
|
26
|
+
|
27
|
+
### commit lint
|
28
|
+
|
29
|
+
- @commitlint/cli
|
30
|
+
- @commitlint/config-conventional
|
31
|
+
|
32
|
+
## the commit message should be
|
33
|
+
|
34
|
+
- "feat: xxx" add xxx
|
35
|
+
- "fix: xxx" fix bug xxx
|
36
|
+
- "docs: xxx" add docs
|
37
|
+
- "style: xxx" style change
|
38
|
+
- "refactor: xxx" refactor code
|
39
|
+
|
40
|
+
... and more in /commitlint.config.mjs
|
@@ -0,0 +1,27 @@
|
|
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
|
+
dist
|
12
|
+
dist-ssr
|
13
|
+
*.local
|
14
|
+
|
15
|
+
# Editor directories and files
|
16
|
+
.vscode/*
|
17
|
+
!.vscode/extensions.json
|
18
|
+
.idea
|
19
|
+
.DS_Store
|
20
|
+
*.suo
|
21
|
+
*.ntvs*
|
22
|
+
*.njsproj
|
23
|
+
*.sln
|
24
|
+
*.sw?
|
25
|
+
|
26
|
+
# types
|
27
|
+
types/auto-imports.d.ts
|
@@ -0,0 +1,28 @@
|
|
1
|
+
export default {
|
2
|
+
extends: ['@commitlint/config-conventional'],
|
3
|
+
rules: {
|
4
|
+
'type-enum': [
|
5
|
+
2,
|
6
|
+
'always',
|
7
|
+
[
|
8
|
+
'feat', // 新功能(feature)
|
9
|
+
'fix', // 修补bug
|
10
|
+
'docs', // 文档(documentation)
|
11
|
+
'style', // 格式、样式(不影响代码运行的变动)
|
12
|
+
'refactor', // 重构(即不是新增功能,也不是修改BUG的代码)
|
13
|
+
'perf', // 优化相关,比如提升性能、体验
|
14
|
+
'test', // 添加测试
|
15
|
+
'ci', // 持续集成修改
|
16
|
+
'chore', // 构建过程或辅助工具的变动
|
17
|
+
'revert', // 回滚到上一个版本
|
18
|
+
'workflow', // 工作流改进
|
19
|
+
'mod', // 不确定分类的修改
|
20
|
+
'wip', // 开发中
|
21
|
+
'types', // 类型修改
|
22
|
+
'release' // 版本发布
|
23
|
+
]
|
24
|
+
],
|
25
|
+
'subject-full-stop': [0, 'never'],
|
26
|
+
'subject-case': [0, 'never']
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { defineConfig } from 'vite';
|
2
|
+
import type { Plugin } from 'vite';
|
3
|
+
import react from '@vitejs/plugin-react';
|
4
|
+
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
|
5
|
+
import AutoImport from 'unplugin-auto-import/vite';
|
6
|
+
import path from 'node:path';
|
7
|
+
import process from 'node:process';
|
8
|
+
|
9
|
+
const basePlugins: Plugin[] = [
|
10
|
+
react({
|
11
|
+
babel: {
|
12
|
+
plugins: [
|
13
|
+
['@babel/plugin-proposal-decorators', { legacy: true }]
|
14
|
+
// ['@babel/plugin-proposal-class-properties', { loose: true }]
|
15
|
+
]
|
16
|
+
}
|
17
|
+
}),
|
18
|
+
TanStackRouterVite(),
|
19
|
+
AutoImport({
|
20
|
+
include: [
|
21
|
+
/\.[tj]sx?$/ // .ts, .tsx, .js, .jsx
|
22
|
+
],
|
23
|
+
imports: ['react', 'jotai'],
|
24
|
+
// 为true时在项目根目录自动创建
|
25
|
+
dts: 'src/types/auto-imports.d.ts'
|
26
|
+
})
|
27
|
+
];
|
28
|
+
|
29
|
+
export default defineConfig({
|
30
|
+
plugins: basePlugins,
|
31
|
+
resolve: {
|
32
|
+
alias: {
|
33
|
+
'@': path.resolve(process.cwd(), 'src')
|
34
|
+
}
|
35
|
+
}
|
36
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export default {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export default {};
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
VITE_APP_DOMAIN="https://api.example.com"
|
@@ -0,0 +1,62 @@
|
|
1
|
+
import js from '@eslint/js';
|
2
|
+
import globals from 'globals';
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh';
|
5
|
+
import tseslint from 'typescript-eslint';
|
6
|
+
import prettier from 'eslint-plugin-prettier';
|
7
|
+
import prettierConfig from './prettier.config.mjs';
|
8
|
+
|
9
|
+
export default tseslint.config(
|
10
|
+
{ ignores: ['dist', 'node_modules'] },
|
11
|
+
{
|
12
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
13
|
+
files: ['**/*.{ts,tsx}'],
|
14
|
+
languageOptions: {
|
15
|
+
ecmaVersion: 2020,
|
16
|
+
globals: globals.browser
|
17
|
+
},
|
18
|
+
plugins: {
|
19
|
+
prettier,
|
20
|
+
'react-hooks': reactHooks,
|
21
|
+
'react-refresh': reactRefresh
|
22
|
+
},
|
23
|
+
rules: {
|
24
|
+
'prettier/prettier': ['error', prettierConfig],
|
25
|
+
'no-useless-escape': 'error',
|
26
|
+
// 'no-undef': 'error', // - for unplugin-auto-import
|
27
|
+
// '@typescript-eslint/no-non-null-assertion': 'error',
|
28
|
+
'no-unused-vars': [
|
29
|
+
'error',
|
30
|
+
// - 未使用的变量都以 _ 开头, 则忽略
|
31
|
+
{
|
32
|
+
argsIgnorePattern: '^_',
|
33
|
+
varsIgnorePattern: '^_'
|
34
|
+
}
|
35
|
+
],
|
36
|
+
'@typescript-eslint/no-unused-vars': [
|
37
|
+
'error',
|
38
|
+
{
|
39
|
+
argsIgnorePattern: '^_',
|
40
|
+
varsIgnorePattern: '^_'
|
41
|
+
}
|
42
|
+
],
|
43
|
+
'@typescript-eslint/consistent-type-imports': 'error', // - 要求 import type
|
44
|
+
'@typescript-eslint/no-use-before-define': [
|
45
|
+
'error',
|
46
|
+
{
|
47
|
+
functions: false
|
48
|
+
}
|
49
|
+
],
|
50
|
+
'@typescript-eslint/ban-ts-comment': 'error',
|
51
|
+
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
52
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
53
|
+
'@typescript-eslint/no-var-requires': 'error',
|
54
|
+
'@typescript-eslint/no-empty-function': 'error',
|
55
|
+
...reactHooks.configs.recommended.rules,
|
56
|
+
'react-refresh/only-export-components': [
|
57
|
+
'warn',
|
58
|
+
{ allowConstantExport: true }
|
59
|
+
]
|
60
|
+
}
|
61
|
+
}
|
62
|
+
);
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/lic.svg" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
7
|
+
<title>Lic-Vite-React-Jotai-Tanstack</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div id="root"></div>
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"name": "lik-create-app",
|
3
|
+
"private": true,
|
4
|
+
"version": "0.0.0",
|
5
|
+
"type": "module",
|
6
|
+
"scripts": {
|
7
|
+
"dev": "vite",
|
8
|
+
"dev:test": "vite --mode test",
|
9
|
+
"build": "tsc -b && vite build",
|
10
|
+
"preview": "vite preview",
|
11
|
+
"lint": "eslint .",
|
12
|
+
"preinstall": "npx only-allow pnpm",
|
13
|
+
"prepare": "husky"
|
14
|
+
},
|
15
|
+
"dependencies": {
|
16
|
+
"@tanstack/react-router": "^1.92.3",
|
17
|
+
"jotai": "^2.11.0",
|
18
|
+
"rainbow-print": "0.0.1-alpha.2",
|
19
|
+
"react": "^18.3.1",
|
20
|
+
"react-dom": "^18.3.1"
|
21
|
+
},
|
22
|
+
"devDependencies": {
|
23
|
+
"@babel/plugin-proposal-decorators": "^7.25.9",
|
24
|
+
"@commitlint/cli": "^19.6.0",
|
25
|
+
"@commitlint/config-conventional": "^19.6.0",
|
26
|
+
"@eslint/js": "^9.13.0",
|
27
|
+
"@tanstack/router-devtools": "^1.92.3",
|
28
|
+
"@tanstack/router-plugin": "^1.91.1",
|
29
|
+
"@types/node": "^22.9.1",
|
30
|
+
"@types/react": "^18.3.12",
|
31
|
+
"@types/react-dom": "^18.3.1",
|
32
|
+
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
33
|
+
"@vitejs/plugin-react": "^4.3.4",
|
34
|
+
"autoprefixer": "^10.4.20",
|
35
|
+
"eslint": "^9.14.0",
|
36
|
+
"eslint-config-prettier": "^9.1.0",
|
37
|
+
"eslint-plugin-prettier": "^5.2.1",
|
38
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
39
|
+
"eslint-plugin-react-refresh": "^0.4.14",
|
40
|
+
"globals": "^15.11.0",
|
41
|
+
"husky": "^9.1.7",
|
42
|
+
"lint-staged": "^15.2.10",
|
43
|
+
"only-allow": "^1.2.1",
|
44
|
+
"tailwindcss": "^3.4.17",
|
45
|
+
"typescript": "~5.6.2",
|
46
|
+
"typescript-eslint": "^8.13.0",
|
47
|
+
"unplugin-auto-import": "^0.18.6",
|
48
|
+
"vite": "^6.0.6"
|
49
|
+
}
|
50
|
+
}
|