Skip to content

Commit 33fa451

Browse files
committed
create-react-app v4.0.0
1 parent 2c30417 commit 33fa451

11 files changed

+11992
-180
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
/node_modules
55
/.pnp
66
.pnp.js
7-
yarn.lock
8-
package-lock.json
97

108
# testing
119
/coverage

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Getting Started with Create React App
2+
13
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
24

35
## Available Scripts
@@ -6,23 +8,23 @@ In the project directory, you can run:
68

79
### `yarn start`
810

9-
Runs the app in the development mode.<br />
11+
Runs the app in the development mode.\
1012
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
1113

12-
The page will reload if you make edits.<br />
14+
The page will reload if you make edits.\
1315
You will also see any lint errors in the console.
1416

1517
### `yarn test`
1618

17-
Launches the test runner in the interactive watch mode.<br />
19+
Launches the test runner in the interactive watch mode.\
1820
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
1921

2022
### `yarn build`
2123

22-
Builds the app for production to the `build` folder.<br />
24+
Builds the app for production to the `build` folder.\
2325
It correctly bundles React in production mode and optimizes the build for the best performance.
2426

25-
The build is minified and the filenames include the hashes.<br />
27+
The build is minified and the filenames include the hashes.\
2628
Your app is ready to be deployed!
2729

2830
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
@@ -45,24 +47,24 @@ To learn React, check out the [React documentation](https://reactjs.org/).
4547

4648
### Code Splitting
4749

48-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
50+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
4951

5052
### Analyzing the Bundle Size
5153

52-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
54+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
5355

5456
### Making a Progressive Web App
5557

56-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
58+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
5759

5860
### Advanced Configuration
5961

60-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
62+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
6163

6264
### Deployment
6365

64-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
66+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
6567

6668
### `yarn build` fails to minify
6769

68-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
70+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

package.json

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
{
22
"name": "uiw-example-create-react-app",
33
"version": "0.1.0",
4-
"description": "Using @uiwjs in @parcel-bundler.",
54
"private": true,
6-
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "https://github.com/uiwjs/uiw-example-create-react-app"
10-
},
115
"dependencies": {
12-
"@testing-library/jest-dom": "5.11.3",
13-
"@testing-library/react": "10.4.8",
14-
"@testing-library/user-event": "12.1.1",
15-
"react": "16.13.1",
16-
"react-dom": "16.13.1",
17-
"react-scripts": "3.4.3",
18-
"uiw": "4.6.9"
6+
"@testing-library/jest-dom": "^5.11.4",
7+
"@testing-library/react": "^11.1.0",
8+
"@testing-library/user-event": "^12.1.10",
9+
"react": "^17.0.1",
10+
"react-dom": "^17.0.1",
11+
"react-scripts": "4.0.0",
12+
"web-vitals": "^0.2.4",
13+
"uiw": "4.6.13"
1914
},
2015
"scripts": {
2116
"start": "react-scripts start",
@@ -24,7 +19,10 @@
2419
"eject": "react-scripts eject"
2520
},
2621
"eslintConfig": {
27-
"extends": "react-app"
22+
"extends": [
23+
"react-app",
24+
"react-app/jest"
25+
]
2826
},
2927
"browserslist": {
3028
"production": [

public/favicon.ico

720 Bytes
Binary file not shown.

src/App.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { Button } from 'uiw';
32
import logo from './logo.svg';
43
import './App.css';
@@ -33,4 +32,3 @@ function App() {
3332
}
3433

3534
export default App;
36-

src/App.test.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import React from 'react';
2-
import { render } from '@testing-library/react';
1+
import { render, screen } from '@testing-library/react';
32
import App from './App';
43

54
test('renders learn react link', () => {
6-
const { getByText } = render(<App />);
7-
const linkElement = getByText(/learn react/i);
5+
render(<App />);
6+
const linkElement = screen.getByText(/learn react/i);
87
expect(linkElement).toBeInTheDocument();
98
});

src/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import ReactDOM from 'react-dom';
33
import './index.css';
44
import App from './App';
5-
import * as serviceWorker from './serviceWorker';
5+
import reportWebVitals from './reportWebVitals';
66

77
ReactDOM.render(
88
<React.StrictMode>
@@ -11,7 +11,7 @@ ReactDOM.render(
1111
document.getElementById('root')
1212
);
1313

14-
// If you want your app to work offline and load faster, you can change
15-
// unregister() to register() below. Note this comes with some pitfalls.
16-
// Learn more about service workers: https://bit.ly/CRA-PWA
17-
serviceWorker.unregister();
14+
// If you want to start measuring performance in your app, pass a function
15+
// to log results (for example: reportWebVitals(console.log))
16+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17+
reportWebVitals();

src/reportWebVitals.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const reportWebVitals = onPerfEntry => {
2+
if (onPerfEntry && onPerfEntry instanceof Function) {
3+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4+
getCLS(onPerfEntry);
5+
getFID(onPerfEntry);
6+
getFCP(onPerfEntry);
7+
getLCP(onPerfEntry);
8+
getTTFB(onPerfEntry);
9+
});
10+
}
11+
};
12+
13+
export default reportWebVitals;

src/serviceWorker.js

-141
This file was deleted.

src/setupTests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// allows you to do things like:
33
// expect(element).toHaveTextContent(/react/i)
44
// learn more: https://github.com/testing-library/jest-dom
5-
import '@testing-library/jest-dom/extend-expect';
5+
import '@testing-library/jest-dom';

0 commit comments

Comments
 (0)