Skip to content

Commit f939286

Browse files
committed
feat: function realization
1 parent 080c2ec commit f939286

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+12474
-184
lines changed

.github/workflows/gh-pages.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master # default branch
7+
8+
env:
9+
CI: false
10+
PUBLIC_URL: '/large-screen-visualization'
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- run: yarn
18+
- run: yarn build
19+
- name: Deploy
20+
uses: peaceiris/actions-gh-pages@v3
21+
with:
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
publish_dir: ./build

README.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
66

77
In the project directory, you can run:
88

9-
### `npm start`
9+
### `pnpm start`
1010

1111
Runs the app in the development mode.\
1212
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
1313

1414
The page will reload if you make edits.\
1515
You will also see any lint errors in the console.
1616

17-
### `npm test`
17+
### `pnpm test`
1818

1919
Launches the test runner in the interactive watch mode.\
2020
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
2121

22-
### `npm run build`
22+
### `pnpm build`
2323

2424
Builds the app for production to the `build` folder.\
2525
It correctly bundles React in production mode and optimizes the build for the best performance.
@@ -29,18 +29,3 @@ Your app is ready to be deployed!
2929

3030
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
3131

32-
### `npm run eject`
33-
34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
35-
36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
37-
38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
39-
40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
41-
42-
## Learn More
43-
44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
45-
46-
To learn React, check out the [React documentation](https://reactjs.org/).

package.json

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"name": "large-screen-visualization",
33
"version": "0.1.0",
4-
"private": true,
54
"dependencies": {
5+
"@ant-design/graphs": "^1.3.2",
6+
"@ant-design/plots": "^1.2.2",
67
"@babel/core": "^7.16.0",
78
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
89
"@svgr/webpack": "^5.5.0",
10+
"@swc/jest": "^0.2.23",
911
"@testing-library/jest-dom": "^5.16.5",
1012
"@testing-library/react": "^13.4.0",
1113
"@testing-library/user-event": "^13.5.0",
@@ -64,7 +66,7 @@
6466
"workbox-webpack-plugin": "^6.4.1"
6567
},
6668
"scripts": {
67-
"start": "node scripts/start.js",
69+
"start": "NODE_OPTIONS=--max_old_space_size=8192 node scripts/start.js",
6870
"build": "node scripts/build.js",
6971
"test": "node scripts/test.js"
7072
},
@@ -86,9 +88,18 @@
8688
"last 1 safari version"
8789
]
8890
},
91+
"babel": {
92+
"presets": [
93+
"react-app"
94+
]
95+
},
96+
"devDependencies": {
97+
"jest-canvas-mock": "^2.4.0",
98+
"sass": "^1.56.1"
99+
},
89100
"jest": {
90101
"roots": [
91-
"<rootDir>/src"
102+
"<rootDir>/src/__tests__"
92103
],
93104
"collectCoverageFrom": [
94105
"src/**/*.{js,jsx,ts,tsx}",
@@ -98,11 +109,11 @@
98109
"react-app-polyfill/jsdom"
99110
],
100111
"setupFilesAfterEnv": [
101-
"<rootDir>/src/setupTests.ts"
112+
"jest-canvas-mock",
113+
"<rootDir>/setupTests.ts"
102114
],
103115
"testMatch": [
104-
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
105-
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
116+
"<rootDir>/src/__tests__/**/*.test.{js,jsx,ts,tsx}"
106117
],
107118
"testEnvironment": "jsdom",
108119
"transform": {
@@ -117,7 +128,8 @@
117128
"modulePaths": [],
118129
"moduleNameMapper": {
119130
"^react-native$": "react-native-web",
120-
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
131+
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy",
132+
"^src/(.+)$": "<rootDir>/src/$1"
121133
},
122134
"moduleFileExtensions": [
123135
"web.js",
@@ -137,9 +149,9 @@
137149
],
138150
"resetMocks": true
139151
},
140-
"babel": {
141-
"presets": [
142-
"react-app"
143-
]
152+
"pnpm": {
153+
"overrides": {
154+
"@antv/g6": "4.7.10"
155+
}
144156
}
145157
}

0 commit comments

Comments
 (0)