create-project-template-cli 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/README.md +5 -0
- package/index.js +133 -0
- package/package.json +33 -0
- package/template/react-shadcn/.husky/commit-msg +4 -0
- package/template/react-shadcn/.husky/pre-commit +1 -0
- package/template/react-shadcn/.stylelintignore +20 -0
- package/template/react-shadcn/.stylelintrc.cjs +258 -0
- package/template/react-shadcn/.vscode/extensions.json +7 -0
- package/template/react-shadcn/README.md +75 -0
- package/template/react-shadcn/commitlint.config.cjs +90 -0
- package/template/react-shadcn/components.json +22 -0
- package/template/react-shadcn/eslint.config.js +58 -0
- package/template/react-shadcn/index.html +13 -0
- package/template/react-shadcn/lint-staged.config.cjs +4 -0
- package/template/react-shadcn/package.json +62 -0
- package/template/react-shadcn/pnpm-lock.yaml +4514 -0
- package/template/react-shadcn/public/vite.svg +1 -0
- package/template/react-shadcn/src/App.css +23 -0
- package/template/react-shadcn/src/App.tsx +20 -0
- package/template/react-shadcn/src/assets/css/tailwindcss.css +120 -0
- package/template/react-shadcn/src/assets/react.svg +1 -0
- package/template/react-shadcn/src/components/ui/button.tsx +58 -0
- package/template/react-shadcn/src/components/ui/card.tsx +92 -0
- package/template/react-shadcn/src/components/ui/input.tsx +21 -0
- package/template/react-shadcn/src/components/ui/label.tsx +22 -0
- package/template/react-shadcn/src/components/ui/navigation-menu.tsx +168 -0
- package/template/react-shadcn/src/lib/utils.ts +6 -0
- package/template/react-shadcn/src/main.tsx +11 -0
- package/template/react-shadcn/src/router/index.tsx +71 -0
- package/template/react-shadcn/src/views/404/index.scss +133 -0
- package/template/react-shadcn/src/views/404/index.tsx +27 -0
- package/template/react-shadcn/src/views/Index/index.tsx +8 -0
- package/template/react-shadcn/src/views/index.tsx +59 -0
- package/template/react-shadcn/tsconfig.app.json +33 -0
- package/template/react-shadcn/tsconfig.json +13 -0
- package/template/react-shadcn/tsconfig.node.json +32 -0
- package/template/react-shadcn/vite.config.ts +36 -0
- package/template/vue-tailwindcss/.editorconfig +8 -0
- package/template/vue-tailwindcss/.eslintrc-auto-import.json +76 -0
- package/template/vue-tailwindcss/.gitattributes +1 -0
- package/template/vue-tailwindcss/.prettierrc.json +6 -0
- package/template/vue-tailwindcss/.vscode/extensions.json +9 -0
- package/template/vue-tailwindcss/README.md +2 -0
- package/template/vue-tailwindcss/env.d.ts +1 -0
- package/template/vue-tailwindcss/eslint.config.ts +90 -0
- package/template/vue-tailwindcss/index.html +13 -0
- package/template/vue-tailwindcss/package.json +53 -0
- package/template/vue-tailwindcss/pnpm-lock.yaml +5021 -0
- package/template/vue-tailwindcss/public/favicon.ico +0 -0
- package/template/vue-tailwindcss/src/App.vue +83 -0
- package/template/vue-tailwindcss/src/assets/base.css +86 -0
- package/template/vue-tailwindcss/src/assets/logo.svg +1 -0
- package/template/vue-tailwindcss/src/assets/main.css +10 -0
- package/template/vue-tailwindcss/src/auto-import.d.ts +71 -0
- package/template/vue-tailwindcss/src/axios/index.ts +107 -0
- package/template/vue-tailwindcss/src/components.d.ts +22 -0
- package/template/vue-tailwindcss/src/main.ts +14 -0
- package/template/vue-tailwindcss/src/router/index.ts +23 -0
- package/template/vue-tailwindcss/src/stores/counter.ts +12 -0
- package/template/vue-tailwindcss/src/views/AboutView.vue +15 -0
- package/template/vue-tailwindcss/src/views/HomeView.vue +7 -0
- package/template/vue-tailwindcss/src/vite-env.d.ts +6 -0
- package/template/vue-tailwindcss/tsconfig.app.json +14 -0
- package/template/vue-tailwindcss/tsconfig.json +14 -0
- package/template/vue-tailwindcss/tsconfig.node.json +34 -0
- package/template/vue-tailwindcss/tsconfig.vitest.json +11 -0
- package/template/vue-tailwindcss/vite.config.ts +33 -0
- package/template/vue-tailwindcss/vitest.config.ts +14 -0
- package/utils.js +73 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import js from "@eslint/js";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import reactHooks, { rules } from "eslint-plugin-react-hooks";
|
|
4
|
+
import reactRefresh from "eslint-plugin-react-refresh";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
7
|
+
|
|
8
|
+
export default defineConfig([
|
|
9
|
+
globalIgnores([
|
|
10
|
+
"dist",
|
|
11
|
+
"**/dist-ssr/**",
|
|
12
|
+
"**/coverage/**",
|
|
13
|
+
"**/node_modules/**",
|
|
14
|
+
"**/.history/**",
|
|
15
|
+
"**/src/assets/**",
|
|
16
|
+
]),
|
|
17
|
+
{
|
|
18
|
+
files: ["**/*.{ts,tsx}"],
|
|
19
|
+
extends: [
|
|
20
|
+
js.configs.recommended,
|
|
21
|
+
tseslint.configs.recommended,
|
|
22
|
+
reactHooks.configs["recommended-latest"],
|
|
23
|
+
reactRefresh.configs.vite,
|
|
24
|
+
],
|
|
25
|
+
languageOptions: {
|
|
26
|
+
ecmaVersion: 2020,
|
|
27
|
+
globals: globals.browser,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
rules: {
|
|
31
|
+
...reactHooks.configs.recommended.rules,
|
|
32
|
+
"react-refresh/only-export-components": [
|
|
33
|
+
"warn",
|
|
34
|
+
{ allowConstantExport: true },
|
|
35
|
+
],
|
|
36
|
+
// 分号
|
|
37
|
+
semi: ["error", "always"],
|
|
38
|
+
// 不允许使用var
|
|
39
|
+
"no-var": "error",
|
|
40
|
+
// 未使用的变量
|
|
41
|
+
"no-unused-vars": [
|
|
42
|
+
"error",
|
|
43
|
+
{
|
|
44
|
+
argsIgnorePattern: "^_", // 忽略以下划线开头的未使用变量
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
// 常量必须const
|
|
48
|
+
"prefer-const": "error",
|
|
49
|
+
// 圈复杂度
|
|
50
|
+
complexity: ["error", 15],
|
|
51
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
52
|
+
// 不允许在条件判断中用复制运算符
|
|
53
|
+
"no-cond-assign": "error",
|
|
54
|
+
// 限制换行必须是LF
|
|
55
|
+
"linebreak-style": ["error", "unix"],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
]);
|
|
@@ -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="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>management</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,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-shadcn",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"lint": "eslint . --ignore-pattern dist/ --ignore-pattern .history --debug",
|
|
10
|
+
"lint:fix": "eslint . --ignore-pattern dist/ --ignore-pattern .history --fix",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"stylelint": "stylelint ./**/*.{css,scss}",
|
|
13
|
+
"stylelint:fix": "stylelint ./**/*.{css,scss} --fix",
|
|
14
|
+
"prepare": "husky install",
|
|
15
|
+
"commit": "czg"
|
|
16
|
+
},
|
|
17
|
+
"commitizen": {
|
|
18
|
+
"path": "node_modules/cz-git"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
22
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
23
|
+
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
24
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
25
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
26
|
+
"class-variance-authority": "^0.7.1",
|
|
27
|
+
"clsx": "^2.1.1",
|
|
28
|
+
"lucide-react": "^0.544.0",
|
|
29
|
+
"react": "^19.1.1",
|
|
30
|
+
"react-dom": "^19.1.1",
|
|
31
|
+
"react-router": "^7.9.3",
|
|
32
|
+
"react-router-dom": "^7.9.3",
|
|
33
|
+
"tailwind-merge": "^3.3.1",
|
|
34
|
+
"tailwindcss": "^4.1.13"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@eslint/js": "^9.36.0",
|
|
38
|
+
"@types/node": "^24.5.2",
|
|
39
|
+
"@types/react": "^19.1.13",
|
|
40
|
+
"@types/react-dom": "^19.1.9",
|
|
41
|
+
"@vitejs/plugin-react": "^5.0.3",
|
|
42
|
+
"babel-plugin-react-compiler": "^19.1.0-rc.3",
|
|
43
|
+
"code-inspector-plugin": "^1.0.3",
|
|
44
|
+
"eslint": "^9.36.0",
|
|
45
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
46
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
47
|
+
"globals": "^16.4.0",
|
|
48
|
+
"husky": "^9.1.7",
|
|
49
|
+
"lint-staged": "^16.2.3",
|
|
50
|
+
"sass-embedded": "^1.93.2",
|
|
51
|
+
"stylelint": "^16.24.0",
|
|
52
|
+
"stylelint-config-recommended-scss": "^16.0.2",
|
|
53
|
+
"stylelint-config-standard": "^39.0.0",
|
|
54
|
+
"stylelint-config-standard-scss": "^16.0.0",
|
|
55
|
+
"stylelint-order": "^7.0.0",
|
|
56
|
+
"stylelint-scss": "^6.12.1",
|
|
57
|
+
"tw-animate-css": "^1.4.0",
|
|
58
|
+
"typescript": "~5.8.3",
|
|
59
|
+
"typescript-eslint": "^8.44.0",
|
|
60
|
+
"vite": "^7.1.7"
|
|
61
|
+
}
|
|
62
|
+
}
|