Skip to content

Commit 0da23a6

Browse files
committed
Update to webpack
1 parent a7bab43 commit 0da23a6

37 files changed

+2374
-1149
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SERVER_URL=

.gitignore

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111

1212
# production
1313
/build
14-
/dist
14+
/dist/*
15+
!dist/_redirects
16+
1517

1618
# misc
1719
.DS_Store
18-
.env.local
19-
.env.development.local
20-
.env.test.local
21-
.env.production.local
20+
.env
2221

2322
npm-debug.log*
2423
yarn-debug.log*

.prettierrc.js .prettierrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module.exports = {
1+
{
22
semi: true,
33
trailingComma: 'es5',
44
singleQuote: true,
55
tabWidth: 2,
6-
};
6+
}

custom.d.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare module '*.svg' {
2+
const content: any;
3+
export default content;
4+
}
5+
6+
declare module '*jpg';
7+
declare module '*png';

public/_redirects dist/_redirects

File renamed without changes.

package.json

+45-33
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,63 @@
11
{
22
"name": "smu-shortcut",
3-
"version": "0.1.0",
3+
"version": "1.1.0",
44
"private": true,
5-
"devDependencies": {
6-
"@typescript-eslint/eslint-plugin": "^3.4.0",
7-
"@typescript-eslint/parser": "^3.4.0",
8-
"eslint-config-prettier": "^6.11.0",
9-
"eslint-plugin-prettier": "^3.1.4",
10-
"prettier": "^2.0.5",
11-
"ts-node": "^8.10.2"
5+
"main": "index.tsx",
6+
"scripts": {
7+
"start": "webpack-dev-server --open --mode development",
8+
"test": "echo \"Error: No Test specified\" && exit 1",
9+
"build": "webpack --mode production",
10+
"clean": "rm -Rf dist/*"
1211
},
13-
"dependencies": {
12+
"devDependencies": {
13+
"@babel/preset-react": "^7.10.4",
1414
"@testing-library/jest-dom": "^4.2.4",
1515
"@testing-library/react": "^9.3.2",
1616
"@testing-library/user-event": "^7.1.2",
17+
"@types/dotenv-webpack": "^1.8.0",
18+
"@types/file-loader": "^4.2.0",
1719
"@types/jest": "^26.0.4",
20+
"@types/lodash": "^4.14.159",
1821
"@types/node": "^14.0.18",
1922
"@types/react": "^16.9.41",
2023
"@types/react-dom": "^16.9.8",
2124
"@types/react-router-dom": "^5.1.5",
22-
"node-sass": "^4.14.1",
23-
"normalize.css": "^8.0.0",
25+
"@types/webpack-dev-server": "^3.11.0",
26+
"@typescript-eslint/eslint-plugin": "^3.4.0",
27+
"@typescript-eslint/parser": "^3.4.0",
28+
"babel-core": "^6.26.3",
29+
"babel-preset-env": "^1.7.0",
30+
"css-loader": "^4.2.1",
31+
"dotenv-webpack": "^2.0.0",
32+
"eslint": "^7.6.0",
33+
"eslint-config-prettier": "^6.11.0",
34+
"eslint-plugin-prettier": "^3.1.4",
35+
"eslint-plugin-react": "^7.20.6",
36+
"eslint-plugin-react-hooks": "^4.0.8",
37+
"file-loader": "^6.0.0",
38+
"fork-ts-checker-webpack-plugin": "^5.0.14",
39+
"html-webpack-plugin": "^4.3.0",
40+
"postcss-modules": "^1.3.2",
41+
"prettier": "^2.0.5",
42+
"sass-loader": "^9.0.3",
43+
"style-loader": "^1.2.1",
44+
"svg-url-loader": "^6.0.0",
45+
"ts-loader": "^8.0.2",
46+
"ts-node": "^8.10.2",
47+
"webpack": "^4.20.2",
48+
"webpack-cli": "^3.3.12",
49+
"webpack-dev-server": "^3.11.0",
50+
"webpack-pwa-manifest": "^4.2.0"
51+
},
52+
"dependencies": {
53+
"babel-polyfill": "^6.26.0",
54+
"lodash": "^4.17.19",
55+
"prop-types": "^15.6.0",
2456
"react": "^16.13.1",
2557
"react-dom": "^16.13.1",
2658
"react-router-dom": "^5.2.0",
27-
"react-scripts": "3.4.1",
59+
"react-scripts": "^3.4.1",
60+
"sass": "^1.26.10",
2861
"typescript": "^3.9.6"
29-
},
30-
"scripts": {
31-
"start": "react-scripts start",
32-
"build": "react-scripts build",
33-
"test": "react-scripts test",
34-
"eject": "react-scripts eject"
35-
},
36-
"eslintConfig": {
37-
"extends": "react-app"
38-
},
39-
"browserslist": {
40-
"production": [
41-
">0.2%",
42-
"not dead",
43-
"not op_mini all"
44-
],
45-
"development": [
46-
"last 1 chrome version",
47-
"last 1 firefox version",
48-
"last 1 safari version"
49-
]
5062
}
5163
}

public/index.html

-46
This file was deleted.

public/manifest.json

-25
This file was deleted.

public/resources/files/community.json

-36
This file was deleted.

public/resources/files/guides.json

-24
This file was deleted.

public/resources/files/home.json

-104
This file was deleted.

public/robots.txt

-3
This file was deleted.

src/App.scss

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
padding: 16px;
2121
}
2222

23+
.padding {
24+
padding: 32px;
25+
}
26+
2327
body {
2428
margin: 0;
2529
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',

0 commit comments

Comments
 (0)