Skip to content

Commit 67b01fd

Browse files
committed
[add] PR badges configuration
[optimize] simplify Repository model based on MobX-GitHub [optimize] replace React with PReact to reduce Bundle Size [optimize] upgrade to PNPM 9 & other Upstream packages
1 parent ae6204a commit 67b01fd

19 files changed

Lines changed: 5671 additions & 4773 deletions

.github/pr-badge.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
- icon: visualstudio
2+
label: 'GitHub.dev'
3+
message: 'PR-$prNumber'
4+
color: 'blue'
5+
url: 'https://github.dev/$owner/$repo/pull/$prNumber'
6+
7+
- icon: github
8+
label: 'GitHub codespaces'
9+
message: 'PR-$prNumber'
10+
color: 'black'
11+
url: 'https://codespaces.new/$owner/$repo/pull/$prNumber'
12+
13+
- icon: git
14+
label: 'GitPod.io'
15+
message: 'PR-$prNumber'
16+
color: 'orange'
17+
url: 'https://gitpod.io/?autostart=true#https://github.com/$owner/$repo/pull/$prNumber'

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: pnpm/action-setup@v2
1717
with:
18-
version: 8
18+
version: 9
1919
- uses: actions/setup-node@v3
2020
if: ${{ !env.VERCEL_TOKEN || !env.VERCEL_ORG_ID || !env.VERCEL_PROJECT_ID }}
2121
with:

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1414
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
1818

1919
- name: Deploy to Vercel

README.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ which is inspired by [WebCell scaffold][5].
1111
## Technology stack
1212

1313
- Language: [TypeScript v5][2]
14-
- Component engine: [React v18][1]
14+
- Component engine: [PReact v10][1]
1515
- State management: [MobX v6][3]
1616
- Component suite: [Ant Design v5][4] + [Bootstrap v5][9] (CSS utilities)
17-
- HTTP Client: [KoAJAX][10]
17+
- HTTP Client: [KoAJAX v1][10]
1818
- PWA framework: [Workbox v7][11]
1919
- Package bundler: [Parcel v2][12]
2020
- CI / CD: GitHub [Actions][13] + [Pages][14]
@@ -25,16 +25,27 @@ which is inspired by [WebCell scaffold][5].
2525
2. [Spinner](./src/component/Spinner.tsx)
2626
3. [REST Form](./src/component/RestForm.tsx)
2727
4. [REST Table](./src/component/RestTable.tsx)
28+
5. [GitHub logo](src/component/Git/Logo.tsx)
29+
6. [GitHub card](src/component/Git/Card.tsx)
2830

2931
## Best practice
3032

31-
1. Install **[Settings][15] GitHub app** in your account or organization
32-
2. Click the **[Use this template][16] button** on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above
33-
3. Click the **[Open in GitHub codespaces][7] button** on the top of ReadMe file, then an **online VS Code development environment** will be started immediately
34-
4. Set [Vercel variables][17] as [Repository secrets][18], then every commit will get an independent **Preview URL**
35-
5. Recommend to add a [Notification step in GitHub actions][19] for your Team IM app
36-
6. Remind the PMs & users of your product to submit **Feature/Enhancement** requests or **Bug** reports with [Issue forms][20] instead of IM messages or Mobile Phone calls
37-
7. Collect all these issues into [Project kanbans][21], then create **Pull requests** & add `closes #issue_number` into its description for automation
33+
1. Install GitHub apps in your organization or account:
34+
35+
1. [Probot settings][15]: set up Issue labels & Pull Request rules
36+
2. [PR badge][16]: set up Online [VS Code][17] editor entries in Pull Request description
37+
38+
2. Click the **[<kbd>Use this template</kbd>][18] button** on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above
39+
40+
3. Click the **[<kbd>Open in GitHub codespaces</kbd>][7] button** on the top of ReadMe file, then an **online VS Code development environment** will be started immediately
41+
42+
4. Set [Vercel variables][19] as [Repository secrets][20], then every commit will get an independent **Preview URL**
43+
44+
5. Recommend to add a [Notification step in GitHub actions][21] for your Team IM app
45+
46+
6. Remind the PMs & users of your product to submit **Feature/Enhancement** requests or **Bug** reports with [Issue forms][22] instead of IM messages or Mobile Phone calls
47+
48+
7. Collect all these issues into [Project kanbans][23], then create **Pull requests** & add `closes #issue_number` into its description for automation
3849

3950
## Development
4051

@@ -67,9 +78,11 @@ pnpm build
6778
[13]: https://github.com/features/actions
6879
[14]: https://pages.github.com/
6980
[15]: https://github.com/apps/settings
70-
[16]: https://github.com/new?template_name=React-MobX-Ant-Design-ts&template_owner=idea2app
71-
[17]: https://github.com/idea2app/Next-Bootstrap-ts/blob/80967ed49045af9dbcf4d3695a2c39d53a6f71f1/.github/workflows/pull-request.yml#L9-L11
72-
[18]: https://github.com/idea2app/React-MobX-Ant-Design-ts/settings/secrets/actions
73-
[19]: https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/bb4675a56bf1d6b207231313da5ed0af7cf0ebd6/.github/workflows/pull-request.yml#L32-L56
74-
[20]: https://github.com/idea2app/React-MobX-Ant-Design-ts/issues/new/choose
75-
[21]: https://github.com/idea2app/React-MobX-Ant-Design-ts/projects
81+
[16]: https://pullrequestbadge.com/
82+
[17]: https://code.visualstudio.com/
83+
[18]: https://github.com/new?template_name=React-MobX-Ant-Design-ts&template_owner=idea2app
84+
[19]: https://github.com/idea2app/React-MobX-Ant-Design-ts/blob/ae6204a04c108eddff7ff5265341676b55918509/.github/workflows/main.yml#L10-L12
85+
[20]: https://github.com/idea2app/React-MobX-Ant-Design-ts/settings/secrets/actions
86+
[21]: https://github.com/kaiyuanshe/kaiyuanshe.github.io/blob/bb4675a56bf1d6b207231313da5ed0af7cf0ebd6/.github/workflows/pull-request.yml#L32-L56
87+
[22]: https://github.com/idea2app/React-MobX-Ant-Design-ts/issues/new/choose
88+
[23]: https://github.com/idea2app/React-MobX-Ant-Design-ts/projects

package.json

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,42 +11,45 @@
1111
"url": "https://github.com/idea2app/React-MobX-Ant-Design-ts/issues"
1212
},
1313
"dependencies": {
14-
"@ant-design/cssinjs": "^1.18.4",
15-
"@ant-design/icons": "^5.3.1",
16-
"antd": "^5.14.2",
14+
"@ant-design/cssinjs": "^1.20.0",
15+
"@ant-design/icons": "^5.3.7",
16+
"antd": "^5.18.0",
1717
"browser-unhandled-rejection": "^1.0.2",
18-
"koajax": "^0.9.6",
18+
"koajax": "^1.1.2",
1919
"lodash": "^4.17.21",
20-
"mobx": "^6.12.0",
20+
"mobx": "^6.12.3",
21+
"mobx-github": "^0.3.1",
2122
"mobx-i18n": "^0.5.0",
22-
"mobx-react": "^9.1.0",
23+
"mobx-react": "^9.1.1",
2324
"mobx-react-helper": "^0.3.1",
24-
"mobx-restful": "^0.7.0-rc.0",
25-
"mobx-restful-table": "^2.0.0-rc.0",
26-
"react": "^18.2.0",
27-
"react-dom": "^18.2.0",
28-
"react-router": "^6.22.2",
25+
"mobx-restful": "^1.0.0-rc.6",
26+
"mobx-restful-table": "^2.0.0-rc.1",
27+
"preact": "^10.22.0",
28+
"react-router": "^6.23.1",
2929
"react-router-class-tools": "^0.1.3",
30-
"react-router-dom": "^6.22.2",
31-
"web-utility": "^4.3.0"
30+
"react-router-dom": "^6.23.1",
31+
"web-utility": "^4.4.0"
3232
},
3333
"devDependencies": {
34-
"@octokit/openapi-types": "^20.0.0",
3534
"@parcel/config-default": "~2.12.0",
3635
"@parcel/packager-raw-url": "~2.12.0",
3736
"@parcel/transformer-typescript-tsc": "~2.12.0",
3837
"@parcel/transformer-webmanifest": "~2.12.0",
39-
"@types/lodash": "^4.14.202",
40-
"@types/node": "^18.19.21",
41-
"@types/react": "^18.2.61",
42-
"@types/react-dom": "^18.2.19",
38+
"@types/lodash": "^4.17.4",
39+
"@types/node": "^18.19.34",
4340
"husky": "^9.0.11",
44-
"lint-staged": "^15.2.2",
41+
"lint-staged": "^15.2.5",
4542
"parcel": "~2.12.0",
46-
"prettier": "^3.2.5",
43+
"prettier": "^3.3.1",
4744
"process": "^0.11.10",
48-
"typescript": "~5.3.3",
49-
"workbox-cli": "^7.0.0"
45+
"typescript": "~5.4.5",
46+
"workbox-cli": "^7.1.0"
47+
},
48+
"alias": {
49+
"react": "preact/compat",
50+
"react-dom/test-utils": "preact/test-utils",
51+
"react-dom": "preact/compat",
52+
"react/jsx-runtime": "preact/jsx-runtime"
5053
},
5154
"prettier": {
5255
"singleQuote": true,

0 commit comments

Comments
 (0)