Skip to content

Commit 6ac8083

Browse files
authored
Merge pull request #550 from coderoad/optimize-build
Optimize build
2 parents d8f46c2 + 93244dc commit 6ac8083

File tree

12 files changed

+734
-476
lines changed

12 files changed

+734
-476
lines changed

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"eslint": "7.32.0",
4040
"git-url-parse": "11.6.0",
4141
"jest": "27.3.1",
42-
"jsdom": "18.1.0",
42+
"jsdom": "18.1.1",
4343
"node-fetch": "2.6.6",
4444
"semver": "7.3.5",
4545
"ts-jest": "27.0.7",
@@ -64,7 +64,7 @@
6464
"eslint-plugin-prettier": "4.0.0",
6565
"eslint-plugin-react": "7.27.1",
6666
"eslint-plugin-react-hooks": "^4.3.0",
67-
"prettier": "^2.4.1",
67+
"prettier": "2.5.0",
6868
"vscode": "^1.1.37",
6969
"vscode-test": "^1.6.1"
7070
},

Diff for: scripts/package.sh

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ OUTPUT_FILE=coderoad-$PACKAGE_VERSION.vsix
1212
echo "Creating $OUTPUT_FILE..."
1313

1414
echo "Building..."
15+
GENERATE_SOURCEMAP=false # reduces output size by 5mb+
1516
yarn build
1617

1718
echo "Packaging Extension..."

Diff for: src/services/hooks/webhooks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const WEBHOOK_EVENTS = {
1111
tutorial_complete: false,
1212
}
1313

14-
// varaibles set on init
14+
// variables set on init
1515
let WEBHOOK_URI: string | undefined
1616

1717
export const setupWebhook = (webhookConfig: TT.WebhookConfig) => {

Diff for: web-app/.storybook/webpack.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = ({ config }) => {
1414
loader: require.resolve('babel-loader'),
1515
options: {
1616
plugins: [
17+
new MiniCssExtractPlugin(),
1718
[
1819
'babel-plugin-import',
1920
{

Diff for: web-app/config-overrides.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function override(config) {
1717

1818
// load @alifd/next component css
1919
addBabelPlugin([
20-
'babel-plugin-import',
20+
'import',
2121
{
2222
libraryName: '@alifd/next',
2323
style: true,

Diff for: web-app/package.json

+16-14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.17.0",
44
"private": true,
55
"scripts": {
6+
"analyze": "source-map-explorer 'build/static/js/*.js'",
67
"build": "react-app-rewired build",
78
"build-storybook": "build-storybook",
89
"start": "react-app-rewired start",
@@ -28,35 +29,35 @@
2829
"@alifd/next": "1.22.25",
2930
"@emotion/babel-preset-css-prop": "10.0.27",
3031
"@emotion/core": "10.0.35",
31-
"@xstate/react": "^1.6.2",
32+
"@xstate/react": "^1.6.3",
3233
"babel-jest": "26.6.3",
3334
"emotion-theming": "10.0.27",
3435
"js-yaml": "4.1.0",
3536
"markdown-it": "12.2.0",
3637
"markdown-it-emoji": "2.0.0",
37-
"moment": "2.29.1",
3838
"prismjs": "1.25.0",
3939
"react": "16.13.1",
4040
"react-addons-css-transition-group": "15.6.2",
4141
"react-dom": "16.13.1",
42-
"reselect": "^4.1.4",
42+
"reselect": "^4.1.5",
4343
"use-media": "1.4.0",
44-
"xstate": "^4.26.0"
44+
"xstate": "^4.26.1"
4545
},
4646
"devDependencies": {
4747
"@babel/core": "7.14.0",
48-
"@storybook/addon-actions": "6.3.12",
49-
"@storybook/addon-knobs": "6.3.1",
50-
"@storybook/addon-links": "6.3.12",
51-
"@storybook/addons": "6.3.12",
52-
"@storybook/preset-create-react-app": "3.1.7",
53-
"@storybook/react": "6.3.12",
48+
"@storybook/addon-actions": "6.4.0",
49+
"@storybook/addon-knobs": "6.4.0",
50+
"@storybook/addon-links": "6.4.0",
51+
"@storybook/addons": "6.4.0",
52+
"@storybook/preset-create-react-app": "3.2.0",
53+
"@storybook/react": "6.4.0",
54+
"@types/git-url-parse": "9.0.1",
5455
"@types/graphql": "14.5.0",
55-
"@types/highlight.js": "9.12.4",
56+
"@types/highlight.js": "10.1.0",
5657
"@types/jest": "26.0.23",
57-
"@types/js-yaml": "3.12.5",
58+
"@types/js-yaml": "4.0.5",
5859
"@types/markdown-it": "12.2.3",
59-
"@types/node": "14.14.19",
60+
"@types/node": "16.11.10",
6061
"@types/prismjs": "1.16.5",
6162
"@types/react": "16.9.49",
6263
"@types/react-addons-css-transition-group": "15.0.5",
@@ -66,10 +67,11 @@
6667
"customize-cra": "1.0.0",
6768
"mini-css-extract-plugin": "0.11.2",
6869
"node-sass": "6.0.1",
69-
"prettier": "2.4.1",
70+
"prettier": "2.5.0",
7071
"react-app-rewired": "2.1.8",
7172
"react-scripts": "4.0.3",
7273
"sass-loader": "12.3.0",
74+
"source-map-explorer": "2.5.2",
7375
"typescript": "4.4.4"
7476
}
7577
}

Diff for: web-app/public/favicon.ico

-3.78 KB
Binary file not shown.

Diff for: web-app/public/index.html

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
1010
-->
1111
<link rel="manifest" href="manifest.json" />
12-
<link rel="shortcut icon" href="favicon.ico" />
1312
<!--
1413
Notice the use of %PUBLIC_URL% in the tags above.
1514
It will be replaced with the URL of the `public` folder during the build.

Diff for: web-app/src/containers/SelectTutorial/TutorialOverview/index.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ const Summary = (props: Props) => (
8585
</div>
8686
<Markdown>{`# ${props.tutorial.summary.title}`}</Markdown>
8787
<Markdown>{`### ${props.tutorial.summary.description}`}</Markdown>
88-
{/* <h5 css={styles.meta}>
89-
<div css={{ marginRight: '2rem' }}>Created by {props.createdBy.name}</div>
90-
<div>Last updated {moment(props.updatedAt).format('M/YYYY')}</div>
91-
</h5> */}
9288
</div>
9389
<div>
9490
<div css={styles.levelList}>

Diff for: web-app/src/services/tutorial/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as TT from 'typings/tutorial'
2-
// @ts-ignore
32
import gitUrlParser from 'git-url-parse'
43

54
const processTutorial = (tutorial: TT.Tutorial): TT.Tutorial => {

0 commit comments

Comments
 (0)