Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PWA CI/CD
on:
push:
branches:
- dev
- '**'
jobs:
Build-and-Deploy:
env:
Expand All @@ -15,10 +15,10 @@ jobs:

- uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: pnpm
- name: Install & Build
run: |
Expand All @@ -27,6 +27,7 @@ jobs:

- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/dev'
with:
publish_dir: ./dist
cname: wuhan2020.kaiyuanshe.cn
Expand All @@ -42,4 +43,4 @@ jobs:
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./dist
vercel-args: --prod
vercel-args: ${{ github.ref == 'refs/heads/dev' && '--prod' || '' }}
35 changes: 0 additions & 35 deletions .github/workflows/push.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vscode/settings.json
.idea/
.DS_Store
.env*
package-lock.json
yarn.lock
node_modules/
Expand Down
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
//npm.pkg.github.com/:_authToken=${GH_PAT}
@wuhan2020:registry=https://npm.pkg.github.com

auto-install-peers = false
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@

## 技术栈

- 逻辑语言: [TypeScript v5][6]
- 组件引擎: [WebCell v3][7]
- 组件库: [BootCell v2][8]
- 状态管理: [MobX v6][9]
- PWA 框架: [Workbox v7][10]
- 打包工具: [Parcel v2][11]
- CI / CD: GitHub [Actions][12] + [Pages][13]
- 逻辑语言: [TypeScript v5][6]
- 组件引擎: [WebCell v3][7]
- 组件库: [BootCell v2][8]
- 状态管理: [MobX v6][9]
- PWA 框架: [Workbox v7][10]
- 打包工具: [Parcel v2][11]
- CI / CD: GitHub [Actions][12] + [Pages][13]

## 开发需求

- 任务看板:https://github.com/orgs/wuhan2020/projects/1?fullscreen=true
- 任务看板:https://github.com/orgs/wuhan2020/projects/1?fullscreen=true

- UI 设计:正在赶制,参与开发的先参照现有页面
- UI 设计:正在赶制,参与开发的先参照现有页面

## 本地开发

Expand All @@ -49,14 +49,16 @@

3. `git clone https://github.com/wuhan2020/WebApp.git`

4. 在本项目文件夹中执行命令
4. [生成 GitHub 个人访问令牌][14],并以 `GH_PAT` 为变量名存入项目根目录的 `.env.personal.local` 文件

5. 在本项目文件夹中执行命令

```shell
pnpm i
pnpm e i
npm start
```

(Windows 用户请在 [PowerShell 5.1+][14]、[Git Bash][15] 或 [WSL][16] 中运行)
(Windows 用户请在 [PowerShell 5.1+][15]、[Git Bash][16] 或 [WSL][17] 中运行)

### 连接本地测试服务器

Expand All @@ -72,15 +74,15 @@ https://github.com/wuhan2020/WebApp/graphs/contributors

### 域名贡献者

[开源社][17] 提供国内备案域名 https://wuhan2020.kaiyuanshe.cn/ ,以解决[国内应用软件内分享时的障碍][18]。
[开源社][18] 提供国内备案域名 https://wuhan2020.kaiyuanshe.cn/ ,以解决[国内应用软件内分享时的障碍][19]。

### 疫情数据提供方

特别感谢以下同学提供了来自丁香园的疫情数据:

- [@hack-fang](https://github.com/hack-fang/nCov/blob/master/API.md)
- [@hack-fang](https://github.com/hack-fang/nCov/blob/master/API.md)

- [@BlankerL](https://github.com/BlankerL/DXY-2019-nCoV-Crawler)
- [@BlankerL](https://github.com/BlankerL/DXY-2019-nCoV-Crawler)

[1]: https://developers.google.cn/web/progressive-web-apps
[2]: https://gitpod.io/?autostart=true#https://github.com/wuhan2020/WebApp
Expand All @@ -95,8 +97,9 @@ https://github.com/wuhan2020/WebApp/graphs/contributors
[11]: https://parceljs.org
[12]: https://github.com/features/actions
[13]: https://pages.github.com/
[14]: https://docs.microsoft.com/zh-cn/powershell/scripting/learn/using-familiar-command-names?view=powershell-5.1
[15]: https://gitforwindows.org/#bash
[16]: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[17]: https://kaiyuanshe.cn/
[18]: https://github.com/wuhan2020/WebApp/issues/21
[14]: https://github.com/wuhan2020/rest-api/pkgs/npm/rest-api
[15]: https://docs.microsoft.com/zh-cn/powershell/scripting/learn/using-familiar-command-names?view=powershell-5.1
[16]: https://gitforwindows.org/#bash
[17]: https://docs.microsoft.com/en-us/windows/wsl/install-win10
[18]: https://kaiyuanshe.cn/
[19]: https://github.com/wuhan2020/WebApp/issues/21
1 change: 0 additions & 1 deletion eslint.config.mjs → eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default tsEslint.config(
{
plugins: {
'@typescript-eslint': tsEslint.plugin,
// @ts-expect-error https://github.com/jsx-eslint/eslint-plugin-react/issues/3699
react: fixupPluginRules(reactPlugin),
'simple-import-sort': simpleImportSortPlugin
}
Expand Down
77 changes: 45 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,58 +13,70 @@
"url": "https://github.com/EasyWebApp/wuhan2020/issues"
},
"dependencies": {
"boot-cell": "^2.0.0-beta.29",
"boot-cell": "^2.0.0-rc.19",
"browser-unhandled-rejection": "^1.0.2",
"cell-router": "^3.0.0-rc.8",
"cell-router": "^4.0.4",
"classnames": "^2.5.1",
"dom-renderer": "^2.4.4",
"echarts": "^5.5.1",
"dom-renderer": "^2.6.2",
"echarts": "^6.0.0",
"echarts-jsx": "^1.2.1",
"github-web-widget": "^4.0.0",
"koajax": "^3.0.3",
"mobx": "^6.13.5",
"mobx-github": "^0.3.5",
"mobx-restful": "^2.0.0",
"web-cell": "^3.0.1",
"web-utility": "^4.4.2"
"koajax": "^3.1.2",
"mobx": "^6.15.0",
"mobx-github": "^0.5.1",
"mobx-restful": "^2.1.3",
"web-cell": "^3.2.2",
"web-utility": "^4.6.1"
},
"devDependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/js": "^9.14.0",
"@parcel/config-default": "~2.12.0",
"@parcel/packager-raw-url": "~2.12.0",
"@parcel/transformer-less": "~2.12.0",
"@parcel/transformer-typescript-tsc": "~2.12.0",
"@parcel/transformer-webmanifest": "~2.12.0",
"@softonus/prettier-plugin-duplicate-remover": "^1.0.1",
"@eslint/compat": "^1.4.0",
"@eslint/js": "^9.36.0",
"@parcel/config-default": "~2.16.0",
"@parcel/packager-raw-url": "~2.16.0",
"@parcel/transformer-less": "~2.16.0",
"@parcel/transformer-typescript-tsc": "~2.16.0",
"@parcel/transformer-webmanifest": "~2.16.0",
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
"@types/eslint-config-prettier": "^6.11.3",
"@types/node": "^20.17.6",
"@types/node": "^22.18.8",
"@wuhan2020/rest-api": "^2.0.0-rc.4",
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.2",
"cross-env": "^10.1.0",
"eslint": "^9.36.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^15.12.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"parcel": "~2.12.0",
"globals": "^16.4.0",
"husky": "^9.1.7",
"jiti": "^2.6.1",
"lint-staged": "^16.2.3",
"parcel": "~2.16.0",
"parcel-transformer-markdown": "^3.0.1",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"postcss": "^8.5.6",
"prettier": "^3.6.2",
"prettier-plugin-css-order": "^2.1.2",
"process": "^0.11.10",
"rimraf": "^6.0.1",
"tsx": "^4.19.2",
"typescript": "~5.6.3",
"typescript-eslint": "^8.13.0",
"tsx": "^4.20.6",
"typescript": "~5.9.3",
"typescript-eslint": "^8.45.0",
"workbox-cli": "^7.3.0"
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@swc/core",
"esbuild",
"lmdb",
"msgpackr-extract"
]
},
"prettier": {
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"tabWidth": 4,
"printWidth": 100,
"overrides": [
{
"files": "*.yml",
Expand All @@ -84,6 +96,7 @@
},
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
"scripts": {
"e": "pnpx @dotenvx/dotenvx run -f .env.personal.local -- pnpm",
"prepare": "husky",
"test": "lint-staged && tsc --noEmit",
"clean": "rimraf .parcel-cache/ dist/",
Expand Down
Loading
Loading