Skip to content

Commit 2ce8154

Browse files
committed
merge
2 parents 414603c + db16202 commit 2ce8154

File tree

149 files changed

+16998
-8887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+16998
-8887
lines changed

.babelrc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
22
"presets": [
3-
"env",
4-
"react"
3+
"@babel/preset-env",
4+
"@babel/preset-react"
55
],
66
"plugins": [
7-
"syntax-dynamic-import",
8-
"transform-object-rest-spread",
9-
"transform-class-properties"
7+
"@babel/plugin-proposal-class-properties"
108
],
119
"env": {
1210
"development": {
1311
"plugins": [
14-
"react-hot-loader/babel"
12+
"react-refresh/babel"
1513
]
1614
}
1715
}

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"extends": "eslint:recommended",
4-
"parser": "babel-eslint",
4+
"parser": "@babel/eslint-parser",
55
"env": {
66
"browser": true,
77
"es6": true,

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
- [ ] Check the current issues to ensure you aren't creating a duplicate.
22
- [ ] Consider making small typo fixes and such directly as pull requests.
33
- [ ] For the voting application, go to https://github.com/webpack-contrib/voting-app.
4+
- [ ] For the document of Chinese translation(中文版文档), go to https://github.com/docschina/webpack.js.org.
45
- [ ] For loader/plugin docs, consider opening an issue in the corresponding repository.
56
- [ ] No existing issue? Go ahead and open a new one.
67
- __Remove these instructions from your PR as they are for your eyes only.__

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ jobs:
5454
staticSrcPath: ./dist
5555
bucket: ${{ secrets.BUCKET }}
5656
region: ${{ secrets.REGION }}
57+
forceFiles: ${{ secrets.FORCE_FILES }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ package-lock.json
1212
internal-links.tap
1313
stats.json
1414
printable.md
15+
repositories/*.json

.travis.yml

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,71 @@
1+
dist: bionic
12
language: node_js
2-
node_js:
3-
- "10.18.0"
3+
node_js: "12"
44

55
cache:
66
yarn: true
7+
npm: false
78
directories:
8-
- node_modules
9-
- dist
109
- .cache
10+
- repositories
1111

1212
stages:
13+
- Lint
14+
- Test
1315
- Build
14-
- Post-build
1516

1617
jobs:
1718
fast_finish: true
1819

1920
include:
20-
- stage: Build
21-
name: Lint and Build
22-
before_install: npm install --global yarn
23-
install:
24-
- yarn
25-
- yarn cypress install
26-
- yarn cypress verify
21+
- stage: Lint
22+
name: Lint
23+
env: CACHE_TYPE=lint
2724
script:
2825
- yarn lint:js || travis_terminate 1
2926
- yarn lint:markdown || travis_terminate 1
3027
- yarn lint:social || travis_terminate 1
31-
- yarn cypress:ci || travis_terminate 1
32-
- yarn build || travis_terminate 1
33-
- yarn lint:links || travis_terminate 1
3428

35-
- stage: Build
29+
- stage: Lint
3630
name: Proselint
3731
language: python
32+
env: CACHE_TYPE=proselint
3833
python: 3.6
3934
cache:
35+
yarn: false
36+
npm: false
4037
pip: true
4138
directories:
4239
- $HOME/.cache
4340
install: pip install -r requirements.txt
4441
script: cp .proselintrc ~/ && proselint src/content
4542

46-
- stage: Post-build
47-
name: Deploy
43+
- stage: Test
44+
name: Cypress
45+
env: CACHE_TYPE=lint
46+
node_js: "10"
47+
install:
48+
- yarn
49+
- yarn cypress install
50+
- yarn cypress verify
51+
script:
52+
- yarn fetch:supporters
53+
- yarn fetch:starter-kits
54+
- yarn cypress:ci || travis_terminate 1
55+
56+
- stage: Build
57+
name: Build
58+
if: branch != master OR type NOT IN (push, cron)
59+
env: CACHE_TYPE=build
60+
script:
61+
- yarn build || travis_terminate 1
62+
- yarn lint:links || travis_terminate 1
63+
64+
- stage: Build
65+
name: Build and Deploy
4866
if: branch = master AND type IN (push, cron)
49-
script: bash ./src/scripts/deploy.sh
67+
env: CACHE_TYPE=build
68+
script:
69+
- yarn build || travis_terminate 1
70+
- yarn lint:links || travis_terminate 1
71+
- bash ./src/scripts/deploy.sh

package.json

Lines changed: 75 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,30 @@
2727
"clean-dist": "rimraf ./dist",
2828
"clean-printable": "rimraf src/content/**/printable.md",
2929
"preclean": "run-s clean-dist clean-printable",
30-
"clean": "rimraf src/content/**/_*.md src/**/_*.json",
31-
"start": "npm run clean-dist && cross-env NODE_ENV=development webpack-dev-server --config webpack.dev.js --env.dev",
32-
"update-repos": "node src/utilities/fetch-package-repos.js",
30+
"clean": "rimraf src/content/**/_*.md src/**/_*.json repositories/*.json",
31+
"start": "npm run clean-dist && cross-env NODE_ENV=development webpack-dev-server --config webpack.dev.js --env.dev --progress",
3332
"content": "node src/scripts/build-content-tree.js ./src/content ./src/_content.json",
3433
"bundle-analyze": "run-s clean fetch printable content && cross-env NODE_ENV=production webpack --config webpack.ssg.js && run-s clean-printable content && cross-env NODE_ENV=production webpack --config webpack.prod.js --profile --json > stats.json && webpack-bundle-analyzer stats.json",
34+
"fetch-repos": "node src/utilities/fetch-package-repos.js",
3535
"fetch": "run-p fetch:*",
3636
"fetch:readmes": "node src/utilities/fetch-package-readmes.js",
3737
"fetch:supporters": "node src/utilities/fetch-supporters.js",
3838
"fetch:starter-kits": "node src/utilities/fetch-starter-kits.js",
3939
"prebuild": "npm run clean",
40-
"build": "run-s fetch:supporters fetch:starter-kits printable content && cross-env NODE_ENV=production webpack --config webpack.ssg.js && run-s clean-printable content && cross-env NODE_ENV=production webpack --config webpack.prod.js",
40+
"build": "run-s fetch printable content && cross-env NODE_ENV=production webpack --config webpack.ssg.js && run-s clean-printable content && cross-env NODE_ENV=production webpack --config webpack.prod.js",
4141
"postbuild": "npm run sitemap",
4242
"build-test": "npm run build && http-server dist/",
4343
"test": "npm run lint",
4444
"lint": "run-s lint:*",
45-
"lint:js": "eslint src --ext .js,.jsx --cache true --cache-location .cache/.eslintcache",
46-
"lint:markdown": "markdownlint --rules markdownlint-rule-emphasis-style --config ./.markdownlint.json *.md ./src/content/**/*.md --ignore './src/content/**/_*.md'",
45+
"lint:js": "npm run lint-js src",
46+
"lint-js": "eslint --ext .js,.jsx,.md --cache --cache-location .cache/.eslintcache",
47+
"lint:markdown": "npm run lint-markdown *.md ./src/content/**/*.md",
48+
"lint-markdown": "markdownlint --rules markdownlint-rule-emphasis-style --config ./.markdownlint.json --ignore './src/content/**/_*.md'",
4749
"lint:social": "alex . -q",
4850
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
49-
"lint:links": "hyperlink -c 8 -r dist/index.html --canonicalroot https://webpack.js.org/ -i --skip https://img.shields.io --skip **/printable** --skip https://david-dm.org --skip https://codecov.io/gh --skip 'content-type-mismatch https://travis-ci.org' > internal-links.tap; cat internal-links.tap | tap-spot",
51+
"lint:links": "hyperlink -c 8 --root dist -r dist/index.html --canonicalroot https://webpack.js.org/ --internal --skip /plugins/extract-text-webpack-plugin/ --skip /printable --skip https:// --skip http:// --skip sw.js > internal-links.tap; cat internal-links.tap | tap-spot",
5052
"lint:heading": "textlint --fix src/content/*",
53+
"lint:heading-blog": "textlint --fix src/content/blog/*",
5154
"lint:headingMDX": "textlint --fix src/content/**/*.mdx",
5255
"sitemap": "cd dist && sitemap-static --ignore-file=../sitemap-ignore.json --pretty --prefix=https://webpack.js.org/ > sitemap.xml",
5356
"serve": "npm run build && sirv start ./dist --port 4000",
@@ -65,8 +68,11 @@
6568
}
6669
},
6770
"lint-staged": {
68-
"*.{js,jsx}": [
69-
"npm run lint:js"
71+
"*.{js,jsx,md}": [
72+
"npm run lint-js"
73+
],
74+
"*.md": [
75+
"npm run lint-markdown"
7076
]
7177
},
7278
"bundlesize": [
@@ -76,108 +82,104 @@
7682
}
7783
],
7884
"devDependencies": {
79-
"@mdx-js/loader": "0.15.7",
80-
"@mdx-js/mdx": "0.15.7",
81-
"@octokit/rest": "^16.27.1",
85+
"@babel/core": "^7.11.6",
86+
"@babel/eslint-parser": "^7.11.5",
87+
"@babel/plugin-proposal-class-properties": "^7.10.4",
88+
"@babel/preset-env": "^7.11.5",
89+
"@babel/preset-react": "^7.10.4",
90+
"@mdx-js/loader": "^1.6.16",
91+
"@octokit/rest": "^18.0.5",
92+
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.2",
8293
"alex": "^5.1.0",
83-
"autoprefixer": "^7.2.3",
84-
"babel-core": "^6.26.0",
85-
"babel-eslint": "^7.2.3",
86-
"babel-loader": "^7.1.2",
87-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
88-
"babel-plugin-transform-class-properties": "^6.24.1",
89-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
90-
"babel-preset-env": "^1.6.0",
91-
"babel-preset-react": "^6.24.1",
92-
"bundlesize": "^0.17.1",
93-
"copy-webpack-plugin": "4.5.2",
94-
"cross-env": "5.2.0",
95-
"css-loader": "^0.28.10",
96-
"cypress": "^4.5.0",
97-
"directory-tree": "2.2.0",
98-
"directory-tree-webpack-plugin": "0.3",
94+
"autoprefixer": "^9.8.6",
95+
"babel-loader": "^8.1.0",
96+
"bundlesize": "^0.18.0",
97+
"copy-webpack-plugin": "^6.1.0",
98+
"cross-env": "^7.0.2",
99+
"css-loader": "^4.3.0",
100+
"css-minimizer-webpack-plugin": "^1.1.3",
101+
"cypress": "^5.3.0",
102+
"directory-tree": "^2.2.4",
103+
"directory-tree-webpack-plugin": "^1.0.2",
99104
"docschina-remark-slugger": "^0.1.4",
100105
"duplexer": "^0.1.1",
101-
"eslint": "4.19.1",
102-
"eslint-loader": "^2.0.0",
106+
"eslint": "^7.8.1",
103107
"eslint-plugin-cypress": "^2.10.3",
104-
"eslint-plugin-markdown": "1.0.0-rc.0",
105-
"file-loader": "^1.1.11",
106-
"fontgen-loader": "git://github.com/EugeneHlushko/fontgen-loader.git#0.1.3",
107-
"front-matter": "^2.3.0",
108-
"gh-pages": "^1.0.0",
109-
"html-webpack-plugin": "^3.2.0",
110-
"html-webpack-template": "^6.1.0",
111-
"http-server": "^0.10.0",
112-
"husky": "^1.0.0-rc.8",
113-
"hyperlink": "^4.4.0",
114-
"jest": "^23.6.0",
115-
"lint-staged": "^8.1.0",
116-
"loader-utils": "^1.1.0",
108+
"eslint-plugin-markdown": "^1.0.2",
109+
"file-loader": "^6.1.0",
110+
"fontgen-loader": "git://github.com/chenxsan/fontgen-loader.git#bugfix/fix-this-exec",
111+
"front-matter": "^4.0.2",
112+
"gh-pages": "^3.1.0",
113+
"html-loader": "^1.3.0",
114+
"html-webpack-plugin": "^4.4.1",
115+
"http-server": "^0.12.3",
116+
"husky": "^4.3.0",
117+
"hyperlink": "^4.5.3",
118+
"jest": "^26.4.2",
119+
"lint-staged": "^10.3.0",
117120
"lodash": "^4.17.19",
118-
"markdown-loader": "^4.0.0",
119-
"markdownlint": "^0.11.0",
120-
"markdownlint-cli": "^0.13.0",
121+
"markdownlint": "^0.20.4",
122+
"markdownlint-cli": "^0.23.2",
121123
"markdownlint-rule-emphasis-style": "^1.0.0",
122-
"marked": "0.6.1",
123-
"mini-css-extract-plugin": "^0.5.0",
124+
"mini-css-extract-plugin": "^1.0.0",
124125
"minimist": "1.2.3",
125-
"mkdirp": "^0.5.1",
126+
"mkdirp": "^1.0.4",
126127
"modularscale-sass": "^3.0.3",
127128
"node-sass": "^4.5.3",
128129
"npm-run-all": "^4.1.1",
129-
"offline-plugin": "^5.0.7",
130-
"optimize-css-assets-webpack-plugin": "^5.0.1",
131-
"postcss-loader": "^2.1.3",
132-
"redirect-webpack-plugin": "^0.1.1",
133-
"remark": "^10.0.1",
134-
"remark-autolink-headings": "5.2.1",
130+
"postcss": "^7.0.32",
131+
"postcss-loader": "^4.0.1",
132+
"react-refresh": "^0.8.3",
133+
"redirect-webpack-plugin": "^1.0.0",
134+
"remark": "^12.0.1",
135+
"remark-autolink-headings": "^6.0.1",
135136
"remark-custom-blockquotes": "1.0.0",
136137
"remark-extract-anchors": "1.1.1",
137-
"remark-loader": "^0.3.0",
138-
"remark-refractor": "1.1.0",
138+
"remark-html": "^12.0.0",
139+
"remark-loader": "^1.0.0",
140+
"remark-refractor": "git://github.com/montogeek/remark-refractor.git",
139141
"remark-responsive-tables": "1.0.0",
140-
"remark-slug": "^5.0.0",
142+
"remark-slug": "^6.0.0",
141143
"request-promise": "4.2.4",
142-
"rimraf": "^2.6.2",
143-
"sass-loader": "^6.0.6",
144-
"sirv-cli": "^0.1.2",
144+
"rimraf": "^3.0.2",
145+
"sass-loader": "^10.0.2",
146+
"sirv-cli": "^1.0.6",
145147
"sitemap-static": "^0.4.2",
146148
"start-server-and-test": "^1.11.0",
147149
"static-site-generator-webpack-plugin": "^3.4.1",
148-
"style-loader": "^0.18.2",
150+
"style-loader": "^2.0.0",
149151
"tap-spot": "^1.1.1",
150-
"terser-webpack-plugin": "^2.3.5",
152+
"terser-webpack-plugin": "^4.1.0",
151153
"textlint": "^11.6.3",
152154
"textlint-rule-heading": "^1.0.10",
153155
"through2": "^2.0.3",
154156
"uglifyjs-webpack-plugin": "^1.1.6",
155-
"webpack": "^4.42.0",
157+
"webpack": "^5.0.0",
156158
"webpack-bundle-analyzer": "^3.3.2",
157159
"webpack-cli": "^3.2.3",
158160
"webpack-dev-server": "^3.2.1",
159-
"webpack-merge": "^4.1.0"
161+
"webpack-merge": "^5.1.4",
162+
"workbox-webpack-plugin": "^5.1.4"
160163
},
161164
"dependencies": {
162-
"ajv": "^5.5.2",
163165
"docsearch.js": "^2.5.2",
164166
"gitter-sidecar": "^1.2.3",
165-
"handlebars": "4.5.3",
166167
"javascriptstuff-db": "^1.12.0",
167168
"lodash.throttle": "^4.1.1",
169+
"path-browserify": "^1.0.1",
168170
"prop-types": "^15.7.2",
169171
"react": "^16.8.6",
170172
"react-banner": "^1.0.0-rc.0",
171173
"react-document-title": "^2.0.3",
172174
"react-dom": "^16.8.6",
173175
"react-g-analytics": "0.4.2",
174-
"react-hot-loader": "^4.0.0-beta.12",
175-
"react-markdown": "4.2.2",
176-
"react-router-dom": "^4.2.2",
177-
"react-tiny-popover": "3.4.2",
176+
"react-router-dom": "^5.2.0",
177+
"react-tiny-popover": "5",
178178
"react-visibility-sensor": "^5.0.2",
179179
"webpack-pwa-manifest": "^4.0.0",
180-
"webpack.vote": "https://github.com/webpack/voting-app.git",
181-
"whatwg-fetch": "^2.0.3"
180+
"webpack.vote": "https://github.com/webpack/voting-app.git"
181+
},
182+
"resolutions": {
183+
"remark-responsive-tables": "git://github.com/chenxsan/remark-responsive-tables.git#bugfix/fix-empty-head"
182184
}
183185
}

repositories/loaders.json

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

0 commit comments

Comments
 (0)