Skip to content

Commit 305cc2a

Browse files
committed
chore: add react-component-tsx example.
1 parent 7bd60b8 commit 305cc2a

File tree

32 files changed

+455
-16
lines changed

32 files changed

+455
-16
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
working-directory: example/react-router
6969
run: npm run build
7070

71+
- name: example @template/react-router-ts
72+
working-directory: example/react-router-ts
73+
run: npm run build
74+
7175
- name: example @template/rematch-tsx
7276
working-directory: example/rematch-tsx
7377
run: npm run build
@@ -180,6 +184,10 @@ jobs:
180184
working-directory: example/react-router
181185
run: npm run build
182186

187+
- name: example @template/react-router-ts
188+
working-directory: example/react-router-ts
189+
run: npm run build
190+
183191
- name: example @template/rematch-tsx
184192
working-directory: example/rematch-tsx
185193
run: npm run build
@@ -247,6 +255,11 @@ jobs:
247255
working-directory: example/react-router
248256
- run: cp -rp example/react-router/react-router.zip ./zip
249257

258+
- name: Compress react-router-ts Example.
259+
run: zip -r -y react-router-ts.zip . -x "node_modules/*" -x "build/*" -x "dist/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
260+
working-directory: example/react-router-ts
261+
- run: cp -rp example/react-router-ts/react-router-ts.zip ./zip
262+
250263
- name: Compress rematch-tsx Example.
251264
run: zip -r -y rematch-tsx.zip . -x "node_modules/*" -x "build/*" -x "dist/*" -x "coverage/*" -x ".eslintcache" -x "sandbox.config.json"
252265
working-directory: example/rematch-tsx

.github/workflows/pr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
working-directory: example/react-router
5858
run: npm run build
5959

60+
- name: example @template/react-router-ts
61+
working-directory: example/react-router-ts
62+
run: npm run build
63+
6064
- name: example @template/rematch-tsx
6165
working-directory: example/rematch-tsx
6266
run: npm run build

example/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"dependencies": {
2020
"react": "~18.2.0",
2121
"react-dom": "~18.2.0",
22-
"web-vitals": "^2.1.2"
22+
"web-vitals": "^2.1.4"
2323
},
2424
"devDependencies": {
2525
"kkt": "^7.5.3"

example/docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"dependencies": {
2424
"react": "~18.2.0",
2525
"react-dom": "~18.2.0",
26-
"react-router-dom": "^6.8.2",
27-
"web-vitals": "^2.1.2"
26+
"react-router-dom": "^6.16.0",
27+
"web-vitals": "^2.1.4"
2828
},
2929
"devDependencies": {
3030
"@uiw/doc": "^4.21.23",

example/electron/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"license": "MIT",
2424
"devDependencies": {
2525
"@kkt/less-modules": "^7.5.3",
26-
"@types/react": "~18.2.0",
27-
"@types/react-dom": "~18.2.0",
26+
"@types/react": "^18.2.28",
27+
"@types/react-dom": "^18.2.13",
2828
"electron": "~26.2.0",
2929
"kkt": "^7.5.3",
3030
"tsbb": "^4.1.5"

example/react-component-tsx/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"@kkt/less-modules": "^7.5.3",
5454
"@kkt/raw-modules": "^7.5.3",
5555
"@kkt/scope-plugin-options": "^7.5.3",
56-
"@types/react": "~18.2.0",
57-
"@types/react-dom": "~18.2.0",
56+
"@types/react": "^18.2.28",
57+
"@types/react-dom": "^18.2.13",
5858
"@types/react-test-renderer": "~18.0.0",
5959
"compile-less-cli": "~1.9.0",
6060
"husky": "~8.0.0",

example/react-router-ts/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

example/react-router-ts/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Basic Example for react-router-ts
2+
===
3+
4+
Use [`react-router`](https://github.com/remix-run/react-router) for the project.
5+
6+
## Quick Start
7+
8+
```bash
9+
$ npx create-kkt my-app -e react-router-ts
10+
cd my-app
11+
npm install
12+
```
13+
14+
**development**
15+
16+
Runs the project in development mode.
17+
18+
```bash
19+
npm run start
20+
```
21+
22+
**production**
23+
24+
Builds the app for production to the build folder.
25+
26+
```bash
27+
npm run build
28+
```
29+
30+
The build is minified and the filenames include the hashes.
31+
Your app is ready to be deployed!
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "@template/react-router-ts",
3+
"version": "7.5.3",
4+
"private": true,
5+
"dependencies": {
6+
"react": "~18.2.0",
7+
"react-dom": "~18.2.0",
8+
"react-router-dom": "^6.16.0",
9+
"web-vitals": "^2.1.4"
10+
},
11+
"devDependencies": {
12+
"@testing-library/jest-dom": "^6.0.0",
13+
"@testing-library/react": "^14.0.0",
14+
"@testing-library/user-event": "^14.0.0",
15+
"@types/jest": "^27.5.2",
16+
"@types/node": "^16.18.58",
17+
"@types/react": "^18.2.28",
18+
"@types/react-dom": "^18.2.13",
19+
"kkt": "^7.5.3"
20+
},
21+
"scripts": {
22+
"start": "kkt start",
23+
"build": "kkt build",
24+
"test": "kkt test --env=jsdom",
25+
"coverage": "kkt test --env=jsdom --coverage"
26+
},
27+
"eslintConfig": {
28+
"extends": [
29+
"react-app",
30+
"react-app/jest"
31+
]
32+
},
33+
"browserslist": {
34+
"production": [
35+
">0.2%",
36+
"not dead",
37+
"not op_mini all"
38+
],
39+
"development": [
40+
"last 1 chrome version",
41+
"last 1 firefox version",
42+
"last 1 safari version"
43+
]
44+
}
45+
}
3.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)