@trapar-waves/react-tailwind 1.1.23 → 2.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 CHANGED
@@ -7,13 +7,15 @@
7
7
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Trapar-waves/react-tailwind/release.yml)
8
8
  ![Renovate](https://img.shields.io/badge/renovate-enabled-blue)
9
9
 
10
+ ![React Tailwind](assets/readme/hero.svg)
11
+
10
12
  ---
11
13
 
12
14
  [中文](./readme/README-CN.md) | [日本語](./readme/README-JP.md) | [Русский язык](./readme/README-RU.md)
13
15
 
14
16
  > A modern UI development template integrating React and Tailwind CSS, with Rsbuild, TypeScript, ESLint (Antfu config), and Iconify support.
15
17
 
16
- ## ✨ Features
18
+ ![Features](assets/readme/headers/features.svg)
17
19
 
18
20
  - **Modern UI Framework:** Built using React (v19) for a component-driven, declarative interface.
19
21
  - **Utility-First Styling:** Employs Tailwind CSS v4 (`tailwindcss`) along with `@tailwindcss/postcss`, enabling flexible and rapid styling while maintaining consistency.
@@ -23,7 +25,23 @@
23
25
  - **Focus on Code Quality:** Includes ESLint with `@antfu/eslint-config` for linting and enforcing best practices in the codebase.
24
26
  - **Git Hooks:** Integrated `husky` and `lint-staged` for pre-commit checks.
25
27
 
26
- ## 💻 Tech Stack
28
+ ## GitHub Pages
29
+
30
+ Pushing a version tag matching `v*` runs [`.github/workflows/pages.yml`](./.github/workflows/pages.yml), which builds with `BASE_PATH=/<repository-name>/`, copies `dist/index.html` to `dist/404.html` for SPA routing, and deploys to GitHub Pages. In the repository **Settings → Pages**, set **Source** to **GitHub Actions** once.
31
+
32
+ Local subpath check (Unix-like shell):
33
+
34
+ ```bash
35
+ BASE_PATH=/react-tailwind/ pnpm run build && pnpm preview
36
+ ```
37
+
38
+ PowerShell:
39
+
40
+ ```powershell
41
+ $env:BASE_PATH="/react-tailwind/"; pnpm run build; pnpm preview
42
+ ```
43
+
44
+ ![Tech Stack](assets/readme/headers/tech-stack.svg)
27
45
 
28
46
  - **Framework/Library:** React (v19)
29
47
  - **Styling:** Tailwind CSS (`tailwindcss`)
@@ -35,22 +53,13 @@
35
53
 
36
54
  See the [package.json](./package.json) for a full list of dependencies.
37
55
 
38
- ## 🚀 Getting Started
39
-
40
- Follow these instructions to get the project running locally.
56
+ ![Getting Started](assets/readme/headers/getting-started.svg)
41
57
 
42
58
  ### Prerequisites
43
59
 
44
- Ensure you have the following installed:
45
-
46
60
  - Node.js (>= 18.x recommended)
47
61
  - Package manager (npm, yarn, or pnpm)
48
62
 
49
- ```bash
50
- node -v
51
- npm -v
52
- ```
53
-
54
63
  ### Installation
55
64
 
56
65
  1. Create a new project using the template:
@@ -63,10 +72,6 @@ npm -v
63
72
 
64
73
  ```bash
65
74
  pnpm install
66
- # or
67
- npm install
68
- # or
69
- yarn install
70
75
  ```
71
76
 
72
77
  3. Start the development server:
@@ -75,7 +80,7 @@ npm -v
75
80
  pnpm dev
76
81
  ```
77
82
 
78
- ## 🧱 Project Structure
83
+ ![Project Structure](assets/readme/headers/project-structure.svg)
79
84
 
80
85
  ```
81
86
  ├── public/ # Static assets
@@ -89,7 +94,7 @@ npm -v
89
94
  └── package.json # Project dependencies and scripts
90
95
  ```
91
96
 
92
- ## 🤝 Contributing
97
+ ![Contributing](assets/readme/headers/contributing.svg)
93
98
 
94
99
  Contributions are welcome and greatly appreciated! Please follow these steps to contribute:
95
100
 
@@ -99,6 +104,10 @@ Contributions are welcome and greatly appreciated! Please follow these steps to
99
104
  4. Push to the branch (`git push origin feature/amazing-feature`)
100
105
  5. Open a Pull Request
101
106
 
107
+ ![License](assets/readme/headers/license.svg)
108
+
109
+ MIT License © 2025 Trapar Waves
110
+
102
111
  ## 👤 Author
103
112
 
104
113
  - **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
@@ -107,5 +116,4 @@ Contributions are welcome and greatly appreciated! Please follow these steps to
107
116
  ## 🔗 Links
108
117
 
109
118
  - **Repository:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
110
- - **Homepage:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
111
119
  - **Issues:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
2
+ <title>Contributing section header</title>
3
+ <defs>
4
+ <linearGradient id="bg-contrib" x1="0%" y1="0%" x2="100%" y2="0%">
5
+ <stop offset="0%" style="stop-color:#06B6D4;stop-opacity:0.15"/>
6
+ <stop offset="100%" style="stop-color:#06B6D4;stop-opacity:0.08"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <!-- Background (opaque) -->
11
+ <rect width="1200" height="80" fill="#FFFFFF"/>
12
+ <rect width="1200" height="80" fill="url(#bg-contrib)"/>
13
+
14
+ <!-- Border -->
15
+ <rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
16
+
17
+ <!-- Bottom accent -->
18
+ <rect x="0" y="76" width="1200" height="4" rx="2" fill="#06B6D4"/>
19
+
20
+ <!-- Emoji -->
21
+ <text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">🤝</text>
22
+
23
+ <!-- Title -->
24
+ <text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">
25
+ Contributing
26
+ </text>
27
+ </svg>
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
2
+ <title>Features section header</title>
3
+ <defs>
4
+ <linearGradient id="bg-features" x1="0%" y1="0%" x2="100%" y2="0%">
5
+ <stop offset="0%" style="stop-color:#06B6D4;stop-opacity:0.15"/>
6
+ <stop offset="100%" style="stop-color:#06B6D4;stop-opacity:0.08"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <!-- Background (opaque) -->
11
+ <rect width="1200" height="80" fill="#FFFFFF"/>
12
+ <rect width="1200" height="80" fill="url(#bg-features)"/>
13
+
14
+ <!-- Border -->
15
+ <rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
16
+
17
+ <!-- Bottom accent -->
18
+ <rect x="0" y="76" width="1200" height="4" rx="2" fill="#06B6D4"/>
19
+
20
+ <!-- Emoji -->
21
+ <text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">✨</text>
22
+
23
+ <!-- Title -->
24
+ <text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">
25
+ Features
26
+ </text>
27
+ </svg>
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
2
+ <title>Getting Started section header</title>
3
+ <defs>
4
+ <linearGradient id="bg-start" x1="0%" y1="0%" x2="100%" y2="0%">
5
+ <stop offset="0%" style="stop-color:#06B6D4;stop-opacity:0.15"/>
6
+ <stop offset="100%" style="stop-color:#06B6D4;stop-opacity:0.08"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <!-- Background (opaque) -->
11
+ <rect width="1200" height="80" fill="#FFFFFF"/>
12
+ <rect width="1200" height="80" fill="url(#bg-start)"/>
13
+
14
+ <!-- Border -->
15
+ <rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
16
+
17
+ <!-- Bottom accent -->
18
+ <rect x="0" y="76" width="1200" height="4" rx="2" fill="#06B6D4"/>
19
+
20
+ <!-- Emoji -->
21
+ <text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">🚀</text>
22
+
23
+ <!-- Title -->
24
+ <text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">
25
+ Getting Started
26
+ </text>
27
+ </svg>
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
2
+ <title>License section header</title>
3
+ <defs>
4
+ <linearGradient id="bg-license" x1="0%" y1="0%" x2="100%" y2="0%">
5
+ <stop offset="0%" style="stop-color:#06B6D4;stop-opacity:0.15"/>
6
+ <stop offset="100%" style="stop-color:#06B6D4;stop-opacity:0.08"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <!-- Background (opaque) -->
11
+ <rect width="1200" height="80" fill="#FFFFFF"/>
12
+ <rect width="1200" height="80" fill="url(#bg-license)"/>
13
+
14
+ <!-- Border -->
15
+ <rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
16
+
17
+ <!-- Bottom accent -->
18
+ <rect x="0" y="76" width="1200" height="4" rx="2" fill="#06B6D4"/>
19
+
20
+ <!-- Emoji -->
21
+ <text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">📄</text>
22
+
23
+ <!-- Title -->
24
+ <text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">
25
+ License
26
+ </text>
27
+ </svg>
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
2
+ <title>Project Structure section header</title>
3
+ <defs>
4
+ <linearGradient id="bg-struct" x1="0%" y1="0%" x2="100%" y2="0%">
5
+ <stop offset="0%" style="stop-color:#06B6D4;stop-opacity:0.15"/>
6
+ <stop offset="100%" style="stop-color:#06B6D4;stop-opacity:0.08"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <!-- Background (opaque) -->
11
+ <rect width="1200" height="80" fill="#FFFFFF"/>
12
+ <rect width="1200" height="80" fill="url(#bg-struct)"/>
13
+
14
+ <!-- Border -->
15
+ <rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
16
+
17
+ <!-- Bottom accent -->
18
+ <rect x="0" y="76" width="1200" height="4" rx="2" fill="#06B6D4"/>
19
+
20
+ <!-- Emoji -->
21
+ <text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">📁</text>
22
+
23
+ <!-- Title -->
24
+ <text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">
25
+ Project Structure
26
+ </text>
27
+ </svg>
@@ -0,0 +1,27 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 80" width="100%">
2
+ <title>Tech Stack section header</title>
3
+ <defs>
4
+ <linearGradient id="bg-tech" x1="0%" y1="0%" x2="100%" y2="0%">
5
+ <stop offset="0%" style="stop-color:#06B6D4;stop-opacity:0.15"/>
6
+ <stop offset="100%" style="stop-color:#06B6D4;stop-opacity:0.08"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <!-- Background (opaque) -->
11
+ <rect width="1200" height="80" fill="#FFFFFF"/>
12
+ <rect width="1200" height="80" fill="url(#bg-tech)"/>
13
+
14
+ <!-- Border -->
15
+ <rect x="0.5" y="0.5" width="1199" height="79" rx="8" ry="8" fill="none" stroke="#E2E8F0" stroke-width="1"/>
16
+
17
+ <!-- Bottom accent -->
18
+ <rect x="0" y="76" width="1200" height="4" rx="2" fill="#06B6D4"/>
19
+
20
+ <!-- Emoji -->
21
+ <text x="40" y="52" font-family="system-ui, sans-serif" font-size="36">💻</text>
22
+
23
+ <!-- Title -->
24
+ <text x="90" y="54" font-family="system-ui, sans-serif" font-size="28" font-weight="bold" fill="#0F172A">
25
+ Tech Stack
26
+ </text>
27
+ </svg>
@@ -0,0 +1,100 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 450" width="100%">
2
+ <title>React Tailwind - Modern React + Tailwind CSS starter template</title>
3
+ <defs>
4
+ <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
5
+ <stop offset="0%" style="stop-color:#F8FAFC"/>
6
+ <stop offset="100%" style="stop-color:#F1F5F9"/>
7
+ </linearGradient>
8
+ <pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse">
9
+ <circle cx="1" cy="1" r="0.5" fill="#E2E8F0" opacity="0.5"/>
10
+ </pattern>
11
+ </defs>
12
+
13
+ <!-- Background -->
14
+ <rect width="1200" height="450" fill="url(#bg)"/>
15
+ <rect width="1200" height="450" fill="url(#grid)"/>
16
+
17
+ <!-- Left side: Project identity (40%) -->
18
+ <g transform="translate(60, 60)">
19
+ <!-- Organization name -->
20
+ <text x="0" y="30" font-family="ui-monospace, monospace" font-size="18" fill="#64748B">
21
+ trapar-waves
22
+ </text>
23
+
24
+ <!-- Repository name -->
25
+ <text x="0" y="90" font-family="system-ui, sans-serif" font-size="64" font-weight="bold" fill="#06B6D4">
26
+ react-tailwind
27
+ </text>
28
+
29
+ <!-- Description -->
30
+ <text x="0" y="140" font-family="system-ui, sans-serif" font-size="24" fill="#475569">
31
+ Modern React + Tailwind CSS
32
+ </text>
33
+ <text x="0" y="175" font-family="system-ui, sans-serif" font-size="24" fill="#475569">
34
+ starter template
35
+ </text>
36
+ </g>
37
+
38
+ <!-- Right side: Feature cards (60%) -->
39
+ <g transform="translate(520, 60)">
40
+ <!-- Card 1: Fast Dev -->
41
+ <g transform="translate(0, 0)">
42
+ <rect width="280" height="140" rx="12" fill="white" stroke="#E2E8F0" stroke-width="1"/>
43
+ <text x="24" y="45" font-family="system-ui, sans-serif" font-size="36">⚡</text>
44
+ <text x="70" y="45" font-family="system-ui, sans-serif" font-size="22" font-weight="bold" fill="#1E293B">
45
+ Fast Dev
46
+ </text>
47
+ <text x="24" y="85" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
48
+ Rsbuild hot reload
49
+ </text>
50
+ <text x="24" y="110" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
51
+ for instant feedback
52
+ </text>
53
+ </g>
54
+
55
+ <!-- Card 2: Tailwind CSS -->
56
+ <g transform="translate(310, 0)">
57
+ <rect width="280" height="140" rx="12" fill="white" stroke="#E2E8F0" stroke-width="1"/>
58
+ <text x="24" y="45" font-family="system-ui, sans-serif" font-size="36">🎨</text>
59
+ <text x="70" y="45" font-family="system-ui, sans-serif" font-size="22" font-weight="bold" fill="#1E293B">
60
+ Tailwind CSS
61
+ </text>
62
+ <text x="24" y="85" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
63
+ Utility-first styling
64
+ </text>
65
+ <text x="24" y="110" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
66
+ for rapid development
67
+ </text>
68
+ </g>
69
+
70
+ <!-- Card 3: Type Safe -->
71
+ <g transform="translate(0, 160)">
72
+ <rect width="280" height="140" rx="12" fill="white" stroke="#E2E8F0" stroke-width="1"/>
73
+ <text x="24" y="45" font-family="system-ui, sans-serif" font-size="36">🔧</text>
74
+ <text x="70" y="45" font-family="system-ui, sans-serif" font-size="22" font-weight="bold" fill="#1E293B">
75
+ Type Safe
76
+ </text>
77
+ <text x="24" y="85" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
78
+ TypeScript support
79
+ </text>
80
+ <text x="24" y="110" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
81
+ for reliable code
82
+ </text>
83
+ </g>
84
+
85
+ <!-- Card 4: Modern -->
86
+ <g transform="translate(310, 160)">
87
+ <rect width="280" height="140" rx="12" fill="white" stroke="#E2E8F0" stroke-width="1"/>
88
+ <text x="24" y="45" font-family="system-ui, sans-serif" font-size="36">📦</text>
89
+ <text x="70" y="45" font-family="system-ui, sans-serif" font-size="22" font-weight="bold" fill="#1E293B">
90
+ Modern
91
+ </text>
92
+ <text x="24" y="85" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
93
+ React 19 + latest
94
+ </text>
95
+ <text x="24" y="110" font-family="system-ui, sans-serif" font-size="16" fill="#64748B">
96
+ toolchain
97
+ </text>
98
+ </g>
99
+ </g>
100
+ </svg>
package/eslint.config.js CHANGED
@@ -1,16 +1,14 @@
1
- import antfu from "@antfu/eslint-config";
1
+ import { rentonReact } from "@renton/eslint-config-react";
2
2
 
3
- export default antfu({
3
+ export default rentonReact({
4
4
  stylistic: {
5
5
  quotes: "double",
6
6
  semi: true,
7
7
  },
8
- markdown: true,
9
- jsonc: true,
10
- typescript: true,
11
- yaml: true,
12
- react: true,
13
- formatters: {
14
- markdown: "prettier",
8
+ }, {
9
+ files: ["pnpm-workspace.yaml"],
10
+ name: "trapar/pnpm-workspace-yaml-trust-policy",
11
+ rules: {
12
+ "pnpm/yaml-enforce-settings": "off",
15
13
  },
16
14
  });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @filename: lint-staged.config.js
2
+ * @file lint-staged.config.js
3
3
  * @type {import('lint-staged').Configuration}
4
4
  */
5
5
  export default {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@trapar-waves/react-tailwind",
3
3
  "type": "module",
4
- "version": "1.1.23",
5
- "packageManager": "pnpm@10.30.0",
4
+ "version": "2.0.0",
5
+ "packageManager": "pnpm@11.24.0",
6
6
  "description": "A modern UI development template integrating React and Tailwind CSS, with Rsbuild, TypeScript, ESLint (Antfu config), and Iconify support.",
7
7
  "author": {
8
8
  "email": "admin@rikka.cc",
@@ -32,31 +32,35 @@
32
32
  "scripts": {
33
33
  "dev": "rsbuild dev --open",
34
34
  "build": "rsbuild build",
35
+ "build:rsdoctor": "cross-env RSDOCTOR=true rsbuild build",
35
36
  "preview": "rsbuild preview",
36
37
  "lint": "eslint . --cache --max-warnings=0 --no-warn-ignored",
37
38
  "postinstall": "husky"
38
39
  },
39
40
  "dependencies": {
40
- "react": "^19.2.4",
41
- "react-dom": "^19.2.4"
41
+ "react": "^19.2.8",
42
+ "react-dom": "^19.2.8"
42
43
  },
43
44
  "devDependencies": {
44
- "@antfu/eslint-config": "^7.4.3",
45
- "@eslint-react/eslint-plugin": "^2.13.0",
46
- "@iconify/json": "^2.2.440",
47
- "@iconify/tailwind4": "^1.2.1",
48
- "@rsbuild/core": "^1.7.3",
49
- "@rsbuild/plugin-react": "^1.4.5",
50
- "@tailwindcss/postcss": "^4.2.0",
51
- "@types/react": "^19.2.14",
52
- "@types/react-dom": "^19.2.3",
53
- "eslint": "^10.0.0",
54
- "eslint-plugin-format": "^1.4.0",
55
- "eslint-plugin-react-hooks": "^7.0.1",
56
- "eslint-plugin-react-refresh": "^0.5.0",
45
+ "@eslint-react/eslint-plugin": "^5.18.6",
46
+ "@iconify/json": "^2.2.522",
47
+ "@iconify/tailwind4": "^1.2.3",
48
+ "@renton/eslint-config-react": "^1.0.0",
49
+ "@rsbuild/core": "^2.2.1",
50
+ "@rsbuild/plugin-react": "^2.1.0",
51
+ "@rsdoctor/rspack-plugin": "^1.6.3",
52
+ "@tailwindcss/postcss": "^4.3.3",
53
+ "@types/react": "^19.2.18",
54
+ "@types/react-dom": "^19.2.5",
55
+ "cross-env": "^10.1.0",
56
+ "eslint": "^10.9.1",
57
+ "eslint-plugin-format": "^2.0.1",
58
+ "eslint-plugin-react-hooks": "^7.1.1",
59
+ "eslint-plugin-react-refresh": "^0.5.5",
57
60
  "husky": "^9.1.7",
58
- "lint-staged": "^16.2.7",
59
- "tailwindcss": "^4.2.0",
60
- "typescript": "^5.9.3"
61
+ "lint-staged": "^17.4.1",
62
+ "tailwindcss": "^4.3.3",
63
+ "typescript": "^6.0.3",
64
+ "unplugin-turbo-console": "^2.3.3"
61
65
  }
62
66
  }
@@ -1,3 +1,9 @@
1
+ minimumReleaseAge: 0
2
+
3
+ shellEmulator: true
4
+
5
+ trustPolicy: off
6
+
1
7
  onlyBuiltDependencies:
2
8
  - "@tailwindcss/oxide"
3
9
  - core-js
@@ -7,105 +7,97 @@
7
7
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Trapar-waves/react-tailwind/release.yml)
8
8
  ![Renovate](https://img.shields.io/badge/renovate-enabled-blue)
9
9
 
10
+ ![React Tailwind](../assets/readme/hero.svg)
11
+
10
12
  ---
11
13
 
12
14
  [English](../README.md) | [日本語](./README-JP.md) | [Русский язык](./README-RU.md)
13
15
 
14
- > 一个现代UI开发模板,集成了React和Tailwind CSS,以及Rsbuild、TypeScript、ESLint (Antfu config)和Iconify支持。
15
-
16
- ## ✨ 特性
16
+ > 一个现代化的 UI 开发模板,集成了 React Tailwind CSS,配合 Rsbuild、TypeScript、ESLintAntfu 配置)和 Iconify 支持。
17
17
 
18
- - **现代UI框架:** 使用React (v19)构建组件驱动的声明式界面。
19
- - **实用优先的样式:** 采用Tailwind CSS v4 (`tailwindcss`)和`@tailwindcss/postcss`,实现灵活快速的样式设计,同时保持一致性。
20
- - **快速开发工作流:** 使用Rsbuild(`@rsbuild/core`和`@rsbuild/plugin-react`)实现优化构建和高效开发服务器性能。
21
- - **图标支持:** 包含`@iconify/json`和`@iconify/tailwind4`,提供可扩展和可定制的图标。
22
- - **类型安全:** 使用TypeScript (v5.9.x)增强代码可靠性,并在开发过程中提供强大的类型检查。
23
- - **注重代码质量:** 包含ESLint和`@antfu/eslint-config`,用于代码 linting 和执行最佳实践。
24
- - **Git Hooks:** 集成`husky`和`lint-staged`用于提交前检查。
18
+ ![Features](../assets/readme/headers/features.svg)
25
19
 
26
- ## 💻 技术栈
20
+ - **现代 UI 框架:** 使用 React (v19) 构建,支持组件驱动的声明式接口。
21
+ - **实用优先的样式:** 采用 Tailwind CSS v4(`tailwindcss`)和 `@tailwindcss/postcss`,实现灵活快速的样式开发,同时保持一致性。
22
+ - **快速开发工作流:** 使用 Rsbuild(`@rsbuild/core` 和 `@rsbuild/plugin-react`)进行优化构建和高效开发服务器性能。
23
+ - **图标支持:** 包含 `@iconify/json` 和 `@iconify/tailwind4`,提供可扩展和可定制的图标。
24
+ - **类型安全:** 利用 TypeScript (v5.9.x) 提高代码可靠性,并在开发过程中提供强大的类型检查。
25
+ - **代码质量:** 包含 ESLint 和 `@antfu/eslint-config` 进行代码检查和最佳实践 enforcement。
26
+ - **Git Hooks:** 集成 `husky` 和 `lint-staged` 进行提交前检查。
27
27
 
28
- - **框架/库:** React (v19)
29
- - **样式:** Tailwind CSS (`tailwindcss`)
30
- - **构建工具:** Rsbuild (`@rsbuild/core`)
31
- - **语言:** TypeScript (v5.9.x)
32
- - **CSS处理:** PostCSS with `@tailwindcss/postcss`
33
- - **代码检查:** ESLint与`@antfu/eslint-config`
34
- - **图标库:** Iconify (`@iconify/json`, `@iconify/tailwind4`)
28
+ ![Tech Stack](../assets/readme/headers/tech-stack.svg)
35
29
 
36
- 完整依赖列表参见[package.json](../package.json)
30
+ - **框架/库:** React (v19)
31
+ - **样式:** Tailwind CSS (`tailwindcss`)
32
+ - **构建工具:** Rsbuild (`@rsbuild/core`)
33
+ - **语言:** TypeScript (v5.9.x)
34
+ - **CSS 处理:** PostCSS 和 `@tailwindcss/postcss`
35
+ - **代码检查:** ESLint 和 `@antfu/eslint-config`
36
+ - **图标:** Iconify (`@iconify/json`, `@iconify/tailwind4`)
37
37
 
38
- ## 🚀 开始使用
38
+ 查看 [package.json](../package.json) 获取完整的依赖列表。
39
39
 
40
- 按照以下说明在本地运行项目。
40
+ ![Getting Started](../assets/readme/headers/getting-started.svg)
41
41
 
42
- ### 前提条件
42
+ ## 前置条件
43
43
 
44
- 确保已安装以下软件:
44
+ - Node.js(推荐 >= 18.x)
45
+ - 包管理器(npm、yarn 或 pnpm)
45
46
 
46
- - Node.js (推荐 >= 18.x 版本)
47
- - 包管理器 (npm, yarn 或 pnpm)
48
-
49
- ```bash
50
- node -v
51
- npm -v
52
- ```
47
+ ### 安装
53
48
 
54
- ### 安装步骤
55
-
56
- 1. 使用模板创建新项目:
49
+ 1. 使用模板创建新项目:
57
50
 
58
51
  ```bash
59
52
  pnpm create trapar-waves
60
53
  ```
61
54
 
62
- 2. 导航到项目目录并安装依赖:
55
+ 2. 导航到项目目录并安装依赖:
63
56
 
64
57
  ```bash
65
58
  pnpm install
66
- # or
67
- npm install
68
- # or
69
- yarn install
70
59
  ```
71
60
 
72
- 3. 启动开发服务器:
61
+ 3. 启动开发服务器:
73
62
 
74
63
  ```bash
75
64
  pnpm dev
76
65
  ```
77
66
 
78
- ## 🧱 项目结构
67
+ ![Project Structure](../assets/readme/headers/project-structure.svg)
79
68
 
80
69
  ```
81
70
  ├── public/ # 静态资源
82
71
  ├── src/ # 源代码
83
- │ ├── App.css # 全局样式和Tailwind导入
72
+ │ ├── App.css # 全局样式和 Tailwind 导入
84
73
  │ ├── App.tsx # 主应用组件
85
74
  │ └── index.tsx # 入口点
86
- ├── rsbuild.config.ts # Rsbuild配置
87
- ├── tsconfig.json # TypeScript配置
88
- ├── eslint.config.js # ESLint配置
75
+ ├── rsbuild.config.ts # Rsbuild 配置
76
+ ├── tsconfig.json # TypeScript 配置
77
+ ├── eslint.config.js # ESLint 配置
89
78
  └── package.json # 项目依赖和脚本
90
79
  ```
91
80
 
92
- ## 🤝 贡献指南
81
+ ![Contributing](../assets/readme/headers/contributing.svg)
93
82
 
94
- 欢迎贡献,非常感谢您的支持!请按照以下步骤进行贡献:
83
+ 欢迎贡献,非常感谢!请按照以下步骤贡献:
95
84
 
96
- 1. Fork 本仓库
97
- 2. 创建功能分支(`git checkout -b feature/amazing-feature`)
98
- 3. 提交您的更改(`git commit -m 'Add some amazing feature'`)
85
+ 1. Fork 仓库
86
+ 2. 创建特性分支(`git checkout -b feature/amazing-feature`)
87
+ 3. 提交更改(`git commit -m 'Add some amazing feature'`)
99
88
  4. 推送到分支(`git push origin feature/amazing-feature`)
100
- 5. 打开Pull Request
89
+ 5. 创建 Pull Request
90
+
91
+ ![License](../assets/readme/headers/license.svg)
92
+
93
+ MIT License © 2025 Trapar Waves
101
94
 
102
- ## 👤 Author
95
+ ## 👤 作者
103
96
 
104
- - **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
105
- - **GitHub Profile:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
97
+ - **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
98
+ - **GitHub 主页:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
106
99
 
107
- ## 🔗 Links
100
+ ## 🔗 链接
108
101
 
109
- - **仓库:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
110
- - **主页:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
111
- - **问题:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
102
+ - **仓库:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
103
+ - **Issues:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
@@ -7,105 +7,97 @@
7
7
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Trapar-waves/react-tailwind/release.yml)
8
8
  ![Renovate](https://img.shields.io/badge/renovate-enabled-blue)
9
9
 
10
+ ![React Tailwind](../assets/readme/hero.svg)
11
+
10
12
  ---
11
13
 
12
14
  [English](../README.md) | [中文](./README-CN.md) | [Русский язык](./README-RU.md)
13
15
 
14
- > ReactとTailwind CSSを統合したモダンなUI開発テンプレート。Rsbuild、TypeScript、ESLint (Antfu config)、Iconifyをサポート。
15
-
16
- ## ✨ 特徴
16
+ > React Tailwind CSS を統合したモダンな UI 開発テンプレート。Rsbuild、TypeScript、ESLintAntfu 設定)、Iconify サポート付き。
17
17
 
18
- - **モダンUIフレームワーク:** コンポーネント駆動の宣言型インターフェースのためにReact (v19)を使用して構築されています。
19
- - **ユーティリティファーストのスタイリング:** Tailwind CSS v4 (`tailwindcss`)と`@tailwindcss/postcss`を採用し、一貫性を維持しながら柔軟で迅速なスタイリングを可能にします。
20
- - **高速開発ワークフロー:** Rsbuild(`@rsbuild/core`と`@rsbuild/plugin-react`)を使用して最適化されたビルドと効率的な開発サーバーパフォーマンスを実現します。
21
- - **アイコンサポート:** `@iconify/json`と`@iconify/tailwind4`を含み、スケーラブルでカスタマイズ可能なアイコンを提供します。
22
- - **型安全性:** TypeScript (v5.9.x)を使用してコードの信頼性を向上させ、開発中に堅牢な型チェックを提供します。
23
- - **コード品質への焦点:** ESLintと`@antfu/eslint-config`を含み、コードベースのリンティングとベストプラクティスの適用を実現します。
24
- - **Git フック:** `husky`と`lint-staged`を統合し、コミット前のチェックを実施します。
18
+ ![Features](../assets/readme/headers/features.svg)
25
19
 
26
- ## 💻 技術スタック
20
+ - **モダン UI フレームワーク:** React (v19) を使用したコンポーネント駆動の宣言的インターフェース。
21
+ - **ユーティリティファーストのスタイリング:** Tailwind CSS v4(`tailwindcss`)と `@tailwindcss/postcss` を採用し、柔軟で迅速なスタイリングを実現しながら一貫性を維持。
22
+ - **高速開発ワークフロー:** Rsbuild(`@rsbuild/core` と `@rsbuild/plugin-react`)を使用し、最適化されたビルドと効率的な開発サーバー性能を実現。
23
+ - **アイコンサポート:** `@iconify/json` と `@iconify/tailwind4` を含み、スケーラブルでカスタマイズ可能なアイコンを提供。
24
+ - **型安全性:** TypeScript (v5.9.x) を活用し、コードの信頼性を向上させ、開発中に堅牢な型チェックを提供。
25
+ - **コード品質:** ESLint と `@antfu/eslint-config` を含み、リントとベストプラクティスの適用を強制。
26
+ - **Git Hooks:** `husky` と `lint-staged` を統合し、コミット前チェックを実行。
27
27
 
28
- - **フレームワーク/ライブラリ:** React (v19)
29
- - **スタイリング:** Tailwind CSS (`tailwindcss`)
30
- - **ビルドツール:** Rsbuild (`@rsbuild/core`)
31
- - **言語:** TypeScript (v5.9.x)
32
- - **CSS処理:** PostCSS with `@tailwindcss/postcss`
33
- - **リンティング:** `@antfu/eslint-config`を備えたESLint
34
- - **アイコン:** Iconify (`@iconify/json`, `@iconify/tailwind4`)
28
+ ![Tech Stack](../assets/readme/headers/tech-stack.svg)
35
29
 
36
- 依存関係の完全なリストについては[package.json](../package.json)を参照してください。
30
+ - **フレームワーク/ライブラリ:** React (v19)
31
+ - **スタイリング:** Tailwind CSS (`tailwindcss`)
32
+ - **ビルドツール:** Rsbuild (`@rsbuild/core`)
33
+ - **言語:** TypeScript (v5.9.x)
34
+ - **CSS 処理:** PostCSS と `@tailwindcss/postcss`
35
+ - **リント:** ESLint と `@antfu/eslint-config`
36
+ - **アイコン:** Iconify (`@iconify/json`, `@iconify/tailwind4`)
37
37
 
38
- ## 🚀 始め方
38
+ 依存関係の完全なリストは [package.json](../package.json) を参照してください。
39
39
 
40
- 以下の手順に従ってプロジェクトをローカルで実行してください。
40
+ ![Getting Started](../assets/readme/headers/getting-started.svg)
41
41
 
42
- ### 前提条件
42
+ ## 前提条件
43
43
 
44
- 以下がインストールされていることを確認してください:
45
-
46
- - Node.js (推奨バージョン >= 18.x)
47
- - パッケージマネージャー (npm, yarn または pnpm)
48
-
49
- ```bash
50
- node -v
51
- npm -v
52
- ```
44
+ - Node.js(>= 18.x 推奨)
45
+ - パッケージマネージャー(npm、yarn、または pnpm)
53
46
 
54
47
  ### インストール
55
48
 
56
- 1. テンプレートを使用して新しいプロジェクトを作成:
49
+ 1. テンプレートを使用して新しいプロジェクトを作成:
57
50
 
58
51
  ```bash
59
52
  pnpm create trapar-waves
60
53
  ```
61
54
 
62
- 2. プロジェクトディレクトリに移動し、依存関係をインストール:
55
+ 2. プロジェクトディレクトリに移動し、依存関係をインストール:
63
56
 
64
57
  ```bash
65
58
  pnpm install
66
- # or
67
- npm install
68
- # or
69
- yarn install
70
59
  ```
71
60
 
72
- 3. 開発サーバーを起動:
61
+ 3. 開発サーバーを起動:
73
62
 
74
63
  ```bash
75
64
  pnpm dev
76
65
  ```
77
66
 
78
- ## 🧱 プロジェクト構造
67
+ ![Project Structure](../assets/readme/headers/project-structure.svg)
79
68
 
80
69
  ```
81
70
  ├── public/ # 静的アセット
82
71
  ├── src/ # ソースコード
83
- │ ├── App.css # グローバルスタイルとTailwindのインポート
72
+ │ ├── App.css # グローバルスタイルと Tailwind インポート
84
73
  │ ├── App.tsx # メインアプリケーションコンポーネント
85
74
  │ └── index.tsx # エントリーポイント
86
- ├── rsbuild.config.ts # Rsbuild設定
87
- ├── tsconfig.json # TypeScript設定
88
- ├── eslint.config.js # ESLint設定
75
+ ├── rsbuild.config.ts # Rsbuild 設定
76
+ ├── tsconfig.json # TypeScript 設定
77
+ ├── eslint.config.js # ESLint 設定
89
78
  └── package.json # プロジェクトの依存関係とスクリプト
90
79
  ```
91
80
 
92
- ## 🤝 コントリビューション
81
+ ![Contributing](../assets/readme/headers/contributing.svg)
82
+
83
+ コントリビュートを歓迎します!以下の手順に従ってコントリビュートしてください:
84
+
85
+ 1. リポジトリをフォーク
86
+ 2. 機能ブランチを作成(`git checkout -b feature/amazing-feature`)
87
+ 3. 変更をコミット(`git commit -m 'Add some amazing feature'`)
88
+ 4. ブランチにプッシュ(`git push origin feature/amazing-feature`)
89
+ 5. Pull Request を作成
93
90
 
94
- 貢献は歓迎され、非常に高く評価されています!貢献するには以下の手順に従ってください:
91
+ ![License](../assets/readme/headers/license.svg)
95
92
 
96
- 1. リポジトリをフォークする
97
- 2. 機能ブランチを作成する(`git checkout -b feature/amazing-feature`)
98
- 3. 変更をコミットする(`git commit -m 'Add some amazing feature'`)
99
- 4. ブランチにプッシュする(`git push origin feature/amazing-feature`)
100
- 5. Pull Requestを開く
93
+ MIT License © 2025 Trapar Waves
101
94
 
102
- ## 👤 Author
95
+ ## 👤 作者
103
96
 
104
- - **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
105
- - **GitHub Profile:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
97
+ - **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
98
+ - **GitHub プロフィール:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
106
99
 
107
- ## 🔗 Links
100
+ ## 🔗 リンク
108
101
 
109
- - **リポジトリ:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
110
- - **ホームページ:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
111
- - **イシュー:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
102
+ - **リポジトリ:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
103
+ - **Issues:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
@@ -7,49 +7,42 @@
7
7
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Trapar-waves/react-tailwind/release.yml)
8
8
  ![Renovate](https://img.shields.io/badge/renovate-enabled-blue)
9
9
 
10
+ ![React Tailwind](../assets/readme/hero.svg)
11
+
10
12
  ---
11
13
 
12
14
  [English](../README.md) | [中文](./README-CN.md) | [日本語](./README-JP.md)
13
15
 
14
- > Современный шаблон разработки пользовательского интерфейса, интегрирующий React и Tailwind CSS, с поддержкой Rsbuild, TypeScript, ESLint (конфигурация Antfu) и Iconify.
16
+ > Современный шаблон разработки UI, интегрирующий React и Tailwind CSS, с поддержкой Rsbuild, TypeScript, ESLint (конфигурация Antfu) и Iconify.
15
17
 
16
- ## ✨ Особенности
18
+ ![Features](../assets/readme/headers/features.svg)
17
19
 
18
- - **Современный UI-фреймворк:** Строится с использованием React (v19) для компонентно-ориентированного декларативного интерфейса.
19
- - **Стилизация с упором на утилиты:** Использует Tailwind CSS v4 (`tailwindcss`) вместе с `@tailwindcss/postcss`, обеспечивая гибкую и быструю стилизацию при сохранении согласованности.
20
- - **Быстрый рабочий процесс разработки:** Использует Rsbuild (`@rsbuild/core` и `@rsbuild/plugin-react`) для оптимизированных сборок и эффективной производительности сервера разработки.
21
- - **Поддержка иконок:** Включает `@iconify/json` и `@iconify/tailwind4` для масштабируемой и настраиваемой иконографии.
22
- - **Типовая безопасность:** Использует TypeScript (v5.9.x) для повышения надежности кода и обеспечения надежной проверки типов во время разработки.
23
- - **Фокус на качестве кода:** Включает ESLint с `@antfu/eslint-config` для линтинга и обеспечения лучших практик в кодовой базе.
24
- - **Git Hooks:** Интеграция `husky` и `lint-staged` для предварительных проверок коммитов.
20
+ - **Современный UI фреймворк:** Построен на React (v19) для компонентно-ориентированного декларативного интерфейса.
21
+ - **Утилитарный подход к стилям:** Использует Tailwind CSS v4 (`tailwindcss`) вместе с `@tailwindcss/postcss`, обеспечивая гибкую и быструю разработку стилей с сохранением一致性.
22
+ - **Быстрый рабочий процесс разработки:** Использует Rsbuild (`@rsbuild/core` и `@rsbuild/plugin-react`) для оптимизированных сборок и эффективной работы сервера разработки.
23
+ - **Поддержка иконок:** Включает `@iconify/json` и `@iconify/tailwind4` для масштабируемых и настраиваемых иконок.
24
+ - **Типобезопасность:** Использует TypeScript (v5.9.x) для повышения надежности кода и обеспечения строгой проверки типов во время разработки.
25
+ - **Фокус на качестве кода:** Включает ESLint с `@antfu/eslint-config` для линтинга и применения лучших практик.
26
+ - **Git Hooks:** Интегрированы `husky` и `lint-staged` для проверок перед коммитом.
25
27
 
26
- ## 💻 Технологический стек
28
+ ![Tech Stack](../assets/readme/headers/tech-stack.svg)
27
29
 
28
- - **Фреймворк/Библиотека:** React (v19)
30
+ - **Фреймворк/библиотека:** React (v19)
29
31
  - **Стилизация:** Tailwind CSS (`tailwindcss`)
30
32
  - **Инструмент сборки:** Rsbuild (`@rsbuild/core`)
31
33
  - **Язык:** TypeScript (v5.9.x)
32
- - **Обработка CSS:** PostCSS with `@tailwindcss/postcss`
33
- - **Линтинг:** ESLint с `@antfu/eslint-config`
34
+ - **Обработка CSS:** PostCSS и `@tailwindcss/postcss`
35
+ - **Линтинг:** ESLint и `@antfu/eslint-config`
34
36
  - **Иконки:** Iconify (`@iconify/json`, `@iconify/tailwind4`)
35
37
 
36
- Полный список зависимостей см. в [package.json](../package.json).
37
-
38
- ## 🚀 Начало работы
38
+ Полный список зависимостей смотрите в [package.json](../package.json).
39
39
 
40
- Следуйте этим инструкциям, чтобы запустить проект локально.
40
+ ![Getting Started](../assets/readme/headers/getting-started.svg)
41
41
 
42
- ### Предварительные требования
42
+ ## Предварительные требования
43
43
 
44
- Убедитесь, что у вас установлены следующие компоненты:
45
-
46
- - Node.js (рекомендуется версия >= 18.x)
47
- - Пакетный менеджер (npm, yarn или pnpm)
48
-
49
- ```bash
50
- node -v
51
- npm -v
52
- ```
44
+ - Node.js (рекомендуется >= 18.x)
45
+ - Менеджер пакетов (npm, yarn или pnpm)
53
46
 
54
47
  ### Установка
55
48
 
@@ -59,14 +52,10 @@ npm -v
59
52
  pnpm create trapar-waves
60
53
  ```
61
54
 
62
- 2. Перейдите в каталог вашего проекта и установите зависимости:
55
+ 2. Перейдите в директорию проекта и установите зависимости:
63
56
 
64
57
  ```bash
65
58
  pnpm install
66
- # or
67
- npm install
68
- # or
69
- yarn install
70
59
  ```
71
60
 
72
61
  3. Запустите сервер разработки:
@@ -75,12 +64,12 @@ npm -v
75
64
  pnpm dev
76
65
  ```
77
66
 
78
- ## 🧱 Структура проекта
67
+ ![Project Structure](../assets/readme/headers/project-structure.svg)
79
68
 
80
69
  ```
81
70
  ├── public/ # Статические ресурсы
82
71
  ├── src/ # Исходный код
83
- │ ├── App.css # Глобальные стили и импорт Tailwind
72
+ │ ├── App.css # Глобальные стили и импорты Tailwind
84
73
  │ ├── App.tsx # Основной компонент приложения
85
74
  │ └── index.tsx # Точка входа
86
75
  ├── rsbuild.config.ts # Конфигурация Rsbuild
@@ -89,23 +78,26 @@ npm -v
89
78
  └── package.json # Зависимости и скрипты проекта
90
79
  ```
91
80
 
92
- ## 🤝 Участие в разработке
81
+ ![Contributing](../assets/readme/headers/contributing.svg)
93
82
 
94
- Вклад в проект приветствуется и очень ценится! Чтобы внести вклад, следуйте этим шагам:
83
+ Участие приветствуется и высоко ценится! Пожалуйста, следуйте этим шагам для вклада:
95
84
 
96
- 1. Сделайте форк репозитория
97
- 2. Создайте ветку с функцией (`git checkout -b feature/amazing-feature`)
98
- 3. Зафиксируйте свои изменения (`git commit -m 'Add some amazing feature'`)
85
+ 1. Fork репозиторий
86
+ 2. Создайте ветку для новой функции (`git checkout -b feature/amazing-feature`)
87
+ 3. Зафиксируйте изменения (`git commit -m 'Add some amazing feature'`)
99
88
  4. Отправьте изменения в ветку (`git push origin feature/amazing-feature`)
100
89
  5. Откройте Pull Request
101
90
 
102
- ## 👤 Author
91
+ ![License](../assets/readme/headers/license.svg)
92
+
93
+ MIT License © 2025 Trapar Waves
94
+
95
+ ## 👤 Автор
103
96
 
104
97
  - **Rikka:** [admin@rikka.cc](mailto:admin@rikka.cc)
105
- - **GitHub Profile:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
98
+ - **Профиль GitHub:** [Muromi-Rikka](https://github.com/Muromi-Rikka)
106
99
 
107
- ## 🔗 Links
100
+ ## 🔗 Ссылки
108
101
 
109
102
  - **Репозиторий:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
110
- - **Домашняя страница:** [https://github.com/Trapar-waves/react-tailwind](https://github.com/Trapar-waves/react-tailwind)
111
- - **Проблемы:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
103
+ - **Issues:** [https://github.com/Trapar-waves/react-tailwind/issues](https://github.com/Trapar-waves/react-tailwind/issues)
package/rsbuild.config.ts CHANGED
@@ -1,8 +1,33 @@
1
1
  import { defineConfig } from "@rsbuild/core";
2
2
  import { pluginReact } from "@rsbuild/plugin-react";
3
+ import { RsdoctorRspackPlugin } from "@rsdoctor/rspack-plugin";
3
4
  import tailwind from "@tailwindcss/postcss";
5
+ import process from "node:process";
6
+ import TurboConsole from "unplugin-turbo-console/rspack";
7
+
8
+ function normalizeBasePath(): string {
9
+ const raw = process.env.BASE_PATH?.trim();
10
+ if (!raw || raw === "/") {
11
+ return "/";
12
+ }
13
+ const prefixed = raw.startsWith("/") ? raw : `/${raw}`;
14
+ return prefixed.endsWith("/") ? prefixed : `${prefixed}/`;
15
+ }
16
+
17
+ const basePath = normalizeBasePath();
18
+ const isUseSubpath = basePath !== "/";
19
+
20
+ const isEnableRsdoctor = Boolean(process.env.RSDOCTOR);
21
+ const isEnableTurboConsole = process.env.NODE_ENV === "development";
4
22
 
5
23
  export default defineConfig({
24
+ ...(isUseSubpath && {
25
+ output: { assetPrefix: basePath },
26
+ server: { base: basePath },
27
+ }),
28
+ performance: {
29
+ ...(isEnableRsdoctor && { buildCache: false }),
30
+ },
6
31
  plugins: [pluginReact()],
7
32
  tools: {
8
33
  postcss: {
@@ -10,5 +35,22 @@ export default defineConfig({
10
35
  plugins: [tailwind],
11
36
  },
12
37
  },
38
+ rspack: {
39
+ plugins: [
40
+ ...(isEnableTurboConsole ? [TurboConsole()] : []),
41
+ ...(isEnableRsdoctor
42
+ ? [
43
+ new RsdoctorRspackPlugin({
44
+ output: {
45
+ mode: "brief",
46
+ options: {
47
+ type: ["json"],
48
+ },
49
+ },
50
+ }),
51
+ ]
52
+ : []),
53
+ ],
54
+ },
13
55
  },
14
56
  });
package/src/app.css ADDED
@@ -0,0 +1,65 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Outfit:wght@400;500;600&display=swap");
2
+
3
+ @import "tailwindcss";
4
+ @plugin "@iconify/tailwind4";
5
+
6
+ @theme {
7
+ --font-display: "Instrument Serif", ui-serif, Georgia, serif;
8
+ --font-sans: "Outfit", system-ui, sans-serif;
9
+ }
10
+
11
+ @media (prefers-reduced-motion: reduce) {
12
+ *,
13
+ *::before,
14
+ *::after {
15
+ animation-duration: 0.01ms !important;
16
+ animation-iteration-count: 1 !important;
17
+ transition-duration: 0.01ms !important;
18
+ }
19
+ }
20
+
21
+ .skip-link {
22
+ position: absolute;
23
+ left: 0.75rem;
24
+ top: 0.75rem;
25
+ z-index: 50;
26
+ padding: 0.5rem 1rem;
27
+ border-radius: 0.375rem;
28
+ background: #0f172a;
29
+ color: #f8fafc;
30
+ font-weight: 600;
31
+ font-size: 0.875rem;
32
+ text-decoration: none;
33
+ transform: translateY(-200%);
34
+ transition: transform 200ms ease-out;
35
+ }
36
+
37
+ .skip-link:focus {
38
+ transform: translateY(0);
39
+ outline: 3px solid #f97316;
40
+ outline-offset: 2px;
41
+ }
42
+
43
+ .hero-grid {
44
+ background-image:
45
+ linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
46
+ linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
47
+ background-size: 48px 48px;
48
+ }
49
+
50
+ .trapar-tech-icon {
51
+ display: inline-flex;
52
+ align-items: center;
53
+ justify-content: center;
54
+ width: 2.75rem;
55
+ height: 2.75rem;
56
+ border-radius: 0.75rem;
57
+ background: rgba(255, 255, 255, 0.95);
58
+ border: 1px solid rgba(234, 88, 12, 0.2);
59
+ flex-shrink: 0;
60
+ }
61
+
62
+ .trapar-tech-icon span[class^="icon-"] {
63
+ font-size: 1.5rem;
64
+ line-height: 1;
65
+ }
package/src/app.tsx ADDED
@@ -0,0 +1,167 @@
1
+ import "./app.css";
2
+
3
+ const HOMEPAGE = "https://github.com/Trapar-waves/react-tailwind";
4
+ const LOGOS_SET_URL = "https://icon-sets.iconify.design/logos/";
5
+
6
+ interface TechItem {
7
+ hint: string;
8
+ iconClass: string;
9
+ id: string;
10
+ label: string;
11
+ }
12
+
13
+ const techStack: TechItem[] = [
14
+ { hint: "组件驱动、声明式 UI", iconClass: "icon-[logos--react]", id: "react", label: "React 19" },
15
+ { hint: "静态类型与编辑器体验", iconClass: "icon-[logos--typescript-icon]", id: "ts", label: "TypeScript" },
16
+ { hint: "tailwindcss · @tailwindcss/postcss", iconClass: "icon-[logos--tailwindcss-icon]", id: "tailwind", label: "Tailwind CSS 4" },
17
+ { hint: "@rsbuild/core · @rsbuild/plugin-react", iconClass: "icon-[material-icon-theme--rstack]", id: "rsbuild", label: "Rsbuild" },
18
+ { hint: "@renton/eslint-config-react", iconClass: "icon-[logos--eslint]", id: "eslint", label: "ESLint" },
19
+ { hint: "@iconify/json · @iconify/tailwind4(含 logos)", iconClass: "icon-[logos--markdown]", id: "iconify", label: "Iconify" },
20
+ { hint: "包管理与 CI 缓存", iconClass: "icon-[logos--pnpm]", id: "pnpm", label: "pnpm" },
21
+ { hint: "本地开发与构建", iconClass: "icon-[logos--nodejs-icon]", id: "node", label: "Node.js" },
22
+ { hint: "Release 与 Pages 工作流", iconClass: "icon-[logos--github-icon]", id: "github", label: "GitHub Actions" },
23
+ ];
24
+
25
+ const readmeFeatures: string[] = [
26
+ "基于 React 19 的组件化界面。",
27
+ "Tailwind CSS v4 与 @tailwindcss/postcss,工具类优先、易迭代。",
28
+ "Rsbuild 提供极速开发与优化构建。",
29
+ "@iconify/json 与 @iconify/tailwind4,支持 logos 等多集合矢量图标。",
30
+ "TypeScript 贯穿模板代码。",
31
+ "@renton/eslint-config-react 统一代码风格与规则。",
32
+ "Husky 与 lint-staged 在提交前执行检查。",
33
+ ];
34
+
35
+ const readmeTechNote = "本模板未内置路由或全局状态;可按业务接入 TanStack Router、Zustand 等,与 README「扩展」章节一致。";
36
+
37
+ export default function App() {
38
+ return (
39
+ <div className="min-h-dvh bg-[#faf8f5] text-slate-900 font-sans antialiased">
40
+ <a className="skip-link" href="#main">
41
+ 跳到主要内容
42
+ </a>
43
+ <div className="hero-grid relative overflow-hidden border-b border-slate-200/80">
44
+ <div
45
+ aria-hidden
46
+ className="pointer-events-none absolute -right-24 top-0 h-72 w-72 rounded-full bg-orange-500/15 blur-3xl motion-safe:animate-[pulse_14s_ease-in-out_infinite]"
47
+ />
48
+ <header className="relative mx-auto max-w-5xl px-6 pb-16 pt-14 sm:px-10 sm:pb-20 sm:pt-20">
49
+ <p className="font-mono text-xs font-medium uppercase tracking-[0.2em] text-orange-700">
50
+ Trapar-waves / react-tailwind
51
+ </p>
52
+ <h1 className="mt-4 max-w-3xl font-display text-4xl font-normal leading-tight text-slate-950 sm:text-5xl">
53
+ Rsbuild、React 19 与 Tailwind CSS 4 的轻量起点
54
+ </h1>
55
+ <p className="mt-6 max-w-2xl text-lg leading-relaxed text-slate-600">
56
+ 本页结合 README 特性与
57
+ {" "}
58
+ <a
59
+ className="font-semibold text-orange-800 underline decoration-orange-300 underline-offset-2 hover:text-orange-950"
60
+ href={LOGOS_SET_URL}
61
+ rel="noreferrer"
62
+ target="_blank"
63
+ >
64
+ Iconify logos
65
+ </a>
66
+ {" "}
67
+ 集合展示技术栈;保留 @theme 字体、跳过链接与减少动效等可访问实践。
68
+ </p>
69
+ <div className="mt-10 flex flex-wrap items-center gap-4">
70
+ <a
71
+ className="inline-flex min-h-11 min-w-11 items-center justify-center rounded-full bg-slate-900 px-8 py-3 text-sm font-semibold text-white shadow-lg shadow-slate-900/15 transition hover:bg-slate-800 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-orange-500"
72
+ href={HOMEPAGE}
73
+ >
74
+ 查看模板仓库
75
+ </a>
76
+ <span aria-hidden className="icon-[logos--react] text-3xl text-sky-700" />
77
+ <span aria-hidden className="icon-[logos--tailwindcss-icon] text-3xl text-cyan-700" />
78
+ <span aria-hidden className="icon-[material-icon-theme--rstack] text-3xl text-amber-800" />
79
+ </div>
80
+ </header>
81
+ </div>
82
+
83
+ <main className="mx-auto max-w-5xl px-6 py-14 sm:px-10" id="main">
84
+ <h2 className="font-display text-2xl text-slate-900">技术栈一览</h2>
85
+ <p className="mt-2 max-w-3xl text-sm leading-relaxed text-slate-600">
86
+ Rsbuild 与 Rspack 生态相关示意使用
87
+ {" "}
88
+ <code className="rounded bg-slate-200/80 px-1.5 py-0.5 text-slate-800">material-icon-theme--rstack</code>
89
+ ;图标集说明见上文链接。
90
+ </p>
91
+ <ul className="mt-8 grid list-none gap-4 p-0 sm:grid-cols-2 lg:grid-cols-3">
92
+ {techStack.map(item => (
93
+ <li
94
+ className="flex gap-4 rounded-2xl border border-slate-200/90 bg-white p-5 shadow-sm"
95
+ key={item.id}
96
+ >
97
+ <div aria-hidden className="trapar-tech-icon">
98
+ <span className={item.iconClass} />
99
+ </div>
100
+ <div>
101
+ <h3 className="text-base font-semibold text-slate-900">{item.label}</h3>
102
+ <p className="mt-1 text-sm leading-snug text-slate-600">{item.hint}</p>
103
+ </div>
104
+ </li>
105
+ ))}
106
+ </ul>
107
+
108
+ <h2 className="font-display mt-14 text-2xl text-slate-900">README 特性摘要</h2>
109
+ <ul className="mt-4 max-w-3xl list-disc space-y-2 pl-5 text-slate-700">
110
+ {readmeFeatures.map(line => (
111
+ <li key={line}>{line}</li>
112
+ ))}
113
+ </ul>
114
+ <p className="mt-4 max-w-3xl text-sm italic text-slate-600">{readmeTechNote}</p>
115
+
116
+ <section aria-labelledby="a11y-heading" className="mt-12 rounded-2xl border border-slate-200/90 bg-white p-6 shadow-sm">
117
+ <h2 className="font-display text-xl text-slate-900" id="a11y-heading">
118
+ 图标与可访问性
119
+ </h2>
120
+ <p className="mt-3 max-w-3xl text-sm leading-relaxed text-slate-600">
121
+ 装饰性技术标识使用 Iconify
122
+ <code className="mx-1 rounded bg-slate-100 px-1">logos</code>
123
+ 集合的矢量类名(与源码中实际 slug 一致),并配合
124
+ <span className="font-medium text-slate-800"> aria-hidden</span>
125
+ ;主操作区保持约 44px 触控高度与可见焦点环;系统开启「减少动态效果」时装饰动画会缩短。
126
+ </p>
127
+ <div className="mt-4 flex flex-wrap gap-3">
128
+ <span aria-hidden className="icon-[logos--eslint] text-3xl text-purple-800" />
129
+ <span aria-hidden className="icon-[logos--typescript-icon] text-3xl text-blue-800" />
130
+ <span aria-hidden className="icon-[logos--github-icon] text-3xl text-slate-800" />
131
+ </div>
132
+ </section>
133
+
134
+ <h2 className="font-display mt-14 text-2xl text-slate-900">界面骨架示例</h2>
135
+ <ul className="mt-8 grid gap-6 sm:grid-cols-2">
136
+ <li className="rounded-2xl border border-slate-200/90 bg-white p-6 shadow-sm transition hover:border-orange-200 hover:shadow-md">
137
+ <h3 className="text-lg font-semibold text-slate-900">Tailwind 4 + PostCSS</h3>
138
+ <p className="mt-2 text-slate-600">
139
+ 使用 @theme 扩展字体族,配合 @utility 与任意值快速迭代布局与间距体系。
140
+ </p>
141
+ </li>
142
+ <li className="rounded-2xl border border-slate-200/90 bg-white p-6 shadow-sm transition hover:border-orange-200 hover:shadow-md">
143
+ <h3 className="text-lg font-semibold text-slate-900">Iconify 图标</h3>
144
+ <p className="mt-2 text-slate-600">
145
+ 通过 @iconify/tailwind4 以原子类方式引用多集合矢量图标,避免 emoji 替代图标。
146
+ </p>
147
+ </li>
148
+ <li className="rounded-2xl border border-slate-200/90 bg-white p-6 shadow-sm transition hover:border-orange-200 hover:shadow-md">
149
+ <h3 className="text-lg font-semibold text-slate-900">可访问与动效</h3>
150
+ <p className="mt-2 text-slate-600">
151
+ 首跳链接、可见焦点环,以及在 prefers-reduced-motion 下弱化装饰性动画。
152
+ </p>
153
+ </li>
154
+ <li className="rounded-2xl border border-slate-200/90 bg-white p-6 shadow-sm transition hover:border-orange-200 hover:shadow-md">
155
+ <h3 className="text-lg font-semibold text-slate-900">GitHub Pages</h3>
156
+ <p className="mt-2 text-slate-600">
157
+ 通过 BASE_PATH 子路径构建,在推送版本标签时由 Actions 发布静态站点。
158
+ </p>
159
+ </li>
160
+ </ul>
161
+ </main>
162
+ <footer className="border-t border-slate-200/80 bg-white/80 py-8 text-center text-sm text-slate-500">
163
+ MIT · Trapar-waves · 图标致谢 Iconify logos(CC0)
164
+ </footer>
165
+ </div>
166
+ );
167
+ }
package/src/index.tsx CHANGED
@@ -1,10 +1,10 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import ReactDOM from "react-dom/client";
3
- import App from "./App";
3
+ import App from "./app";
4
4
 
5
- const rootEl = document.getElementById("root");
6
- if (rootEl) {
7
- const root = ReactDOM.createRoot(rootEl);
5
+ const rootElement = document.querySelector("#root");
6
+ if (rootElement) {
7
+ const root = ReactDOM.createRoot(rootElement);
8
8
  root.render(
9
9
  <React.StrictMode>
10
10
  <App />
package/src/App.css DELETED
@@ -1,2 +0,0 @@
1
- @import 'tailwindcss';
2
- @plugin "@iconify/tailwind4";
package/src/App.tsx DELETED
@@ -1,13 +0,0 @@
1
- import "./App.css";
2
-
3
- function App() {
4
- return (
5
- <div className="bg-red-200">
6
- <h1 className="text-green-800">Rsbuild with React</h1>
7
- <p>Start building amazing things with Rsbuild.</p>
8
- <span className="icon-[cryptocurrency--btc]"></span>
9
- </div>
10
- );
11
- }
12
-
13
- export default App;
File without changes