Skip to content

Commit 1f85a7e

Browse files
authored
Remove unused deps from /website (#3124)
* Replace scripts/serve.js with npx serve * Remove cheerio Originally used in https://github.com/nusmodifications/nusmods/pull/467/files#diff-8fa0217f468e2439fe9dcef4e04df6ae5ab902ccdd7bb6f92ff984e713c960a2, but that cors-crawler.js script has been removed. * Remove react-test-renderer
1 parent f71ec41 commit 1f85a7e

File tree

4 files changed

+12
-40
lines changed

4 files changed

+12
-40
lines changed

website/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,16 @@ yarn e2e
307307
# Run against deploy preview
308308
LAUNCH_URL="https://deploy-preview-1024--nusmods.netlify.com" yarn e2e
309309
310-
# Enable local testing
310+
# Run against local development server
311+
yarn start # Start a local development server
311312
./BrowserStackLocal --key $BROWSERSTACK_ACCESS_KEY
312313
LAUNCH_URL="http://localhost:8080" LOCAL_TEST=1 yarn e2e
314+
315+
# Run against local production server
316+
yarn build # Build to ./dist directory
317+
npx serve -s dist # Start a local server that serves ./dist
318+
./BrowserStackLocal --key $BROWSERSTACK_ACCESS_KEY
319+
LAUNCH_URL="http://localhost:5000" LOCAL_TEST=1 yarn e2e
313320
```
314321

315322
### Deployment

website/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@
7272
"babel-plugin-transform-react-class-to-function": "1.2.2",
7373
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
7474
"chalk": "4.1.0",
75-
"cheerio": "1.0.0-rc.3",
7675
"codecov": "3.8.1",
7776
"compression-webpack-plugin": "7.1.1",
78-
"connect-history-api-fallback": "1.6.0",
7977
"copy-webpack-plugin": "7.0.0",
8078
"cross-env": "7.0.3",
8179
"css-loader": "5.0.1",
@@ -91,7 +89,6 @@
9189
"eslint-plugin-prettier": "3.3.0",
9290
"eslint-plugin-react": "7.22.0",
9391
"eslint-plugin-react-hooks": "4.2.0",
94-
"express": "4.17.1",
9592
"fast-json-stable-stringify": "2.1.0",
9693
"fs-extra": "9.0.1",
9794
"graceful-fs": "4.2.4",
@@ -109,11 +106,9 @@
109106
"prettier": "2.2.1",
110107
"react-dev-utils": "11.0.1",
111108
"react-refresh": "0.9.0",
112-
"react-test-renderer": "17.0.1",
113109
"redux-logger": "3.0.6",
114110
"redux-mock-store": "1.5.4",
115111
"sass-loader": "10.1.0",
116-
"serve-static": "1.14.1",
117112
"style-loader": "2.0.0",
118113
"stylelint": "13.8.0",
119114
"stylelint-config-prettier": "8.0.2",

website/scripts/serve.js

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

website/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,7 @@ check-types@^8.0.3:
33213321
resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552"
33223322
integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==
33233323

3324-
cheerio@1.0.0-rc.3, cheerio@^1.0.0-rc.3:
3324+
cheerio@^1.0.0-rc.3:
33253325
version "1.0.0-rc.3"
33263326
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.3.tgz#094636d425b2e9c0f4eb91a46c05630c9a1a8bf6"
33273327
integrity sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==
@@ -3640,7 +3640,7 @@ confusing-browser-globals@^1.0.10:
36403640
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59"
36413641
integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==
36423642

3643-
connect-history-api-fallback@1.6.0, connect-history-api-fallback@^1.6.0:
3643+
connect-history-api-fallback@^1.6.0:
36443644
version "1.6.0"
36453645
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc"
36463646
integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==
@@ -5104,7 +5104,7 @@ expect@^26.6.2:
51045104
jest-message-util "^26.6.2"
51055105
jest-regex-util "^26.0.0"
51065106

5107-
express@4.17.1, express@^4.16.3, express@^4.17.1:
5107+
express@^4.16.3, express@^4.17.1:
51085108
version "4.17.1"
51095109
resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
51105110
integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
@@ -10064,7 +10064,7 @@ react-side-effect@^2.1.0:
1006410064
resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.1.tgz#66c5701c3e7560ab4822a4ee2742dee215d72eb3"
1006510065
integrity sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ==
1006610066

10067-
react-test-renderer@17.0.1, react-test-renderer@^17.0.0:
10067+
react-test-renderer@^17.0.0:
1006810068
version "17.0.1"
1006910069
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-17.0.1.tgz#3187e636c3063e6ae498aedf21ecf972721574c7"
1007010070
integrity sha512-/dRae3mj6aObwkjCcxZPlxDFh73XZLgvwhhyON2haZGUEhiaY5EjfAdw+d/rQmlcFwdTpMXCSGVk374QbCTlrA==

0 commit comments

Comments
 (0)