Skip to content

Commit dbc45c3

Browse files
committed
bootsrap project, fix issue with current version of create react app typescript
see: facebook/create-react-app#10110
1 parent 3d36a55 commit dbc45c3

File tree

8 files changed

+1380
-880
lines changed

8 files changed

+1380
-880
lines changed

package.json

Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,49 @@
11
{
2-
"name": "calendar-demo",
3-
"version": "0.1.0",
4-
"private": true,
5-
"dependencies": {
6-
"@testing-library/jest-dom": "^5.11.4",
7-
"@testing-library/react": "^11.1.0",
8-
"@testing-library/user-event": "^12.1.10",
9-
"@types/jest": "^26.0.15",
10-
"@types/node": "^12.0.0",
11-
"@types/react": "^16.9.53",
12-
"@types/react-dom": "^16.9.8",
13-
"react": "^17.0.1",
14-
"react-dom": "^17.0.1",
15-
"react-scripts": "4.0.0",
16-
"typescript": "^4.0.3",
17-
"web-vitals": "^0.2.4"
18-
},
19-
"scripts": {
20-
"start": "react-scripts start",
21-
"build": "react-scripts build",
22-
"test": "react-scripts test",
23-
"eject": "react-scripts eject"
24-
},
25-
"eslintConfig": {
26-
"extends": [
27-
"react-app",
28-
"react-app/jest"
29-
]
30-
},
31-
"browserslist": {
32-
"production": [
33-
">0.2%",
34-
"not dead",
35-
"not op_mini all"
36-
],
37-
"development": [
38-
"last 1 chrome version",
39-
"last 1 firefox version",
40-
"last 1 safari version"
41-
]
42-
}
2+
"name": "calendar-demo",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@emotion/react": "^11.1.1",
7+
"@emotion/styled": "^11.0.0",
8+
"@testing-library/jest-dom": "^5.11.4",
9+
"@testing-library/react": "^11.1.0",
10+
"@testing-library/user-event": "^12.1.10",
11+
"@types/jest": "^26.0.15",
12+
"@types/node": "^12.0.0",
13+
"@types/react": "^16.9.53",
14+
"@types/react-dom": "^16.9.8",
15+
"react": "^17.0.1",
16+
"react-dom": "^17.0.1",
17+
"react-router-dom": "^5.2.0",
18+
"react-scripts": "4.0.0-next.98",
19+
"typescript": "^4.1.2",
20+
"web-vitals": "^0.2.4"
21+
},
22+
"scripts": {
23+
"start": "react-scripts start",
24+
"build": "react-scripts build",
25+
"test": "react-scripts test",
26+
"eject": "react-scripts eject"
27+
},
28+
"eslintConfig": {
29+
"extends": [
30+
"react-app",
31+
"react-app/jest"
32+
]
33+
},
34+
"browserslist": {
35+
"production": [
36+
">0.2%",
37+
"not dead",
38+
"not op_mini all"
39+
],
40+
"development": [
41+
"last 1 chrome version",
42+
"last 1 firefox version",
43+
"last 1 safari version"
44+
]
45+
},
46+
"devDependencies": {
47+
"@types/react-router-dom": "^5.1.6"
48+
}
4349
}

src/App.css

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/App.tsx

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
1-
import React from 'react';
2-
import logo from './logo.svg';
3-
import './App.css';
1+
import React from 'react'
2+
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom'
43

5-
function App() {
6-
return (
7-
<div className="App">
8-
<header className="App-header">
9-
<img src={logo} className="App-logo" alt="logo" />
10-
<p>
11-
Edit <code>src/App.tsx</code> and save to reload.
12-
</p>
13-
<a
14-
className="App-link"
15-
href="https://reactjs.org"
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
>
19-
Learn React
20-
</a>
21-
</header>
22-
</div>
23-
);
24-
}
4+
const App = () => <p>hello world</p>
255

26-
export default App;
6+
export default App

src/index.css

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/index.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
3-
import './index.css';
4-
import App from './App';
5-
import reportWebVitals from './reportWebVitals';
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
import App from './App'
4+
import reportWebVitals from './reportWebVitals'
65

76
ReactDOM.render(
8-
<React.StrictMode>
9-
<App />
10-
</React.StrictMode>,
11-
document.getElementById('root')
12-
);
7+
<React.StrictMode>
8+
<App />
9+
</React.StrictMode>,
10+
document.getElementById('root')
11+
)
1312

1413
// If you want to start measuring performance in your app, pass a function
1514
// to log results (for example: reportWebVitals(console.log))
1615
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17-
reportWebVitals();
16+
reportWebVitals()

src/logo.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

tsconfig.json

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
{
2-
"compilerOptions": {
3-
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"esModuleInterop": true,
12-
"allowSyntheticDefaultImports": true,
13-
"strict": true,
14-
"forceConsistentCasingInFileNames": true,
15-
"noFallthroughCasesInSwitch": true,
16-
"module": "esnext",
17-
"moduleResolution": "node",
18-
"resolveJsonModule": true,
19-
"isolatedModules": true,
20-
"noEmit": true,
21-
"jsx": "react-jsx"
22-
},
23-
"include": [
24-
"src"
25-
]
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": ["dom", "dom.iterable", "esnext"],
5+
"allowJs": true,
6+
"skipLibCheck": true,
7+
"esModuleInterop": true,
8+
"allowSyntheticDefaultImports": true,
9+
"strict": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"noFallthroughCasesInSwitch": true,
12+
"module": "esnext",
13+
"moduleResolution": "node",
14+
"resolveJsonModule": true,
15+
"isolatedModules": true,
16+
"noEmit": true,
17+
"jsx": "react"
18+
},
19+
"include": ["src"]
2620
}

0 commit comments

Comments
 (0)