Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop md configurations #5316

Merged
merged 8 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trim_trailing_whitespace = true
insert_final_newline = true

# Format Source Code
[*.{md,js,jsx,json,scss,hbs}]
[*.{md,mdx,js,jsx,json,scss,hbs}]
charset = utf-8
indent_style = space
indent_size = 2
Expand Down
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist/
examples/
src/content/loaders/_*.md
src/content/plugins/_*.md
src/content/loaders/_*.mdx
src/content/plugins/_*.mdx
8 changes: 2 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
jest: true,
'cypress/globals': true,
},
plugins: ['markdown', 'cypress', 'react-hooks'],
plugins: ['cypress', 'react-hooks'],
rules: {
'no-console': 'off',
semi: ['error', 'always'],
Expand Down Expand Up @@ -41,11 +41,7 @@ module.exports = {
},
},
{
files: ['**/*.md'],
processor: 'markdown/markdown',
},
{
files: ['**/*.{md,mdx}/*.{js,javascript}'], // we don't lint ts at the moment
files: ['**/*.mdx/*.{js,javascript}'], // we don't lint ts at the moment
rules: {
indent: ['error', 2],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ node_modules
dist
!examples/**/dist
src/**/_*.json
src/**/_*.md
src/**/_*.mdx
.vscode
.idea
.DS_Store
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"clean-dist": "rimraf ./dist",
"clean-printable": "rimraf src/content/**/printable.mdx",
"preclean": "run-s clean-dist clean-printable",
"clean": "rimraf src/content/**/_*.md src/**/_*.json repositories/*.json",
"clean": "rimraf src/content/**/_*.mdx src/**/_*.json repositories/*.json",
"start": "npm run clean-dist && webpack serve --config webpack.dev.js --env dev --progress --node-env development",
"content": "node src/scripts/build-content-tree.js ./src/content ./src/_content.json",
"bundle-analyze": "run-s clean fetch content && webpack --config webpack.prod.js --node-env production && run-s printable content && webpack --config webpack.ssg.js --node-env production --env ssg --profile --json > stats.json && webpack-bundle-analyzer stats.json",
Expand All @@ -43,8 +43,8 @@
"lint": "run-s lint:*",
"lint:js": "npm run lint-js .",
"lint-js": "eslint --cache --cache-location .cache/.eslintcache",
"lint:markdown": "npm run lint-markdown *.md ./src/content/**/*.md",
"lint-markdown": "markdownlint --config ./.markdownlint.json --ignore './src/content/**/_*.md' --ignore '.vale/**/*.md' --ignore '.github/**/*.md'",
"lint:markdown": "npm run lint-markdown *.md",
"lint-markdown": "markdownlint --config ./.markdownlint.json --ignore '.vale/**/*.md' --ignore '.github/**/*.md'",
"lint:prose": "vale --config='.vale.ini' src/content",
"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",
"sitemap": "cd dist && sitemap-static --ignore-file=../sitemap-ignore.json --pretty --prefix=https://webpack.js.org/ > sitemap.xml",
Expand Down Expand Up @@ -92,12 +92,10 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-cypress": "^2.11.3",
"eslint-plugin-markdown": "^2.2.0",
"eslint-plugin-mdx": "^1.14.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"front-matter": "^4.0.2",
"html-loader": "^2.1.2",
"html-webpack-plugin": "^5.3.2",
"http-server": "^0.12.3",
"husky": "^7.0.1",
Expand All @@ -123,8 +121,7 @@
"remark-extract-anchors": "1.1.1",
"remark-frontmatter": "^3.0.0",
"remark-gfm": "^1.0.0",
"remark-html": "^13.0.1",
"remark-loader": "^4.0.0",
"remark-html": "^13.0.0",
chenxsan marked this conversation as resolved.
Show resolved Hide resolved
"remark-refractor": "git://github.com/montogeek/remark-refractor.git",
chenxsan marked this conversation as resolved.
Show resolved Hide resolved
"remark-slug": "^6.1.0",
"rimraf": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/content/migrate/5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Create an [issue](https://github.com/webpack/webpack/issues/new?template=Bug_rep

## Something missing in this guide?

Please open a [Pull Request](https://github.com/webpack/webpack.js.org/edit/master/src/content/migrate/5.md) to help the next person using this guide.
Please open a [Pull Request](https://github.com/webpack/webpack.js.org/edit/master/src/content/migrate/5.mdx) to help the next person using this guide.

## Changes to internals

Expand Down
2 changes: 1 addition & 1 deletion src/utilities/content-tree-enhancers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const enhance = (tree, options) => {
const dir = path.normalize(options.dir).replace(/^(\.\/)/gm, '');

tree.url = tree.path
// delete `.md` extensions
// delete `.mdx` extensions
.replace(tree.extension, '')
// delete source content directory
.replace(dir, '')
Expand Down
16 changes: 0 additions & 16 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,6 @@ module.exports = ({ ssg = false }) => ({
},
],
},
{
test: /\.md$/,
use: [
{
loader: 'html-loader',
},
{
loader: 'remark-loader',
options: {
remarkOptions: {
plugins: [...mdPlugins, require('remark-html')],
},
},
},
],
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
Expand Down
93 changes: 15 additions & 78 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6047,9 +6047,9 @@ hast-util-parse-selector@^2.0.0:
integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==

hast-util-sanitize@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/hast-util-sanitize/-/hast-util-sanitize-3.0.0.tgz#4cdc26b2991b3bf90ee74b5c932e14d907549312"
integrity sha512-gxsM24ARtuulsrWEj8QtVM6FNeAEHklF/t7TEIWvX1wuQcoAQtJtEUcT8t0os4uxCUqh1epX/gTi8fp8gNKvCA==
version "3.0.2"
resolved "https://registry.yarnpkg.com/hast-util-sanitize/-/hast-util-sanitize-3.0.2.tgz#b0b783220af528ba8fe6999f092d138908678520"
integrity sha512-+2I0x2ZCAyiZOO/sb4yNLFmdwPBnyJ4PBkVTUMKMqBwYNA+lXSgOmoRXlJFazoyid9QPogRRKgKhVEodv181sA==
dependencies:
xtend "^4.0.0"

Expand All @@ -6069,9 +6069,9 @@ hast-util-to-estree@^1.1.0:
zwitch "^1.0.0"

hast-util-to-html@^7.0.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-7.1.1.tgz#39818b8bbfcb8eaa87846a120b3875487b27d094"
integrity sha512-Ujqj0hGuo3dIQKilkbauAv5teOqPvhaSLEgs1lgApFT0812e114KiffV8XfE4ttR8dRPqxNOIJOMu6SKOVOGlg==
version "7.1.3"
resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-7.1.3.tgz#9f339ca9bea71246e565fc79ff7dbfe98bb50f5e"
integrity sha512-yk2+1p3EJTEE9ZEUkgHsUSVhIpCsL/bvT8E5GzmWc+N1Po5gBw+0F8bo7dpxXR0nu0bQVxVZGX2lBGF21CmeDw==
dependencies:
ccount "^1.0.0"
comma-separated-tokens "^1.0.0"
Expand Down Expand Up @@ -6187,15 +6187,7 @@ html-escaper@^2.0.0:
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==

html-loader@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/html-loader/-/html-loader-2.1.2.tgz#17eb111441e863a9308071ed876b4ba861f143df"
integrity sha512-XB4O1+6mpLp4qy/3qg5+1QPZ/uXvWtO64hNAX87sKHwcHkp1LJGU7V3sJ9iVmRACElAZXQ4YOO/Lbkx5kYfl9A==
dependencies:
html-minifier-terser "^5.1.1"
parse5 "^6.0.1"

html-minifier-terser@^5.0.1, html-minifier-terser@^5.1.1:
html-minifier-terser@^5.0.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054"
integrity sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==
Expand Down Expand Up @@ -6736,7 +6728,7 @@ is-date-object@^1.0.1:
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==

is-decimal@^1.0.0, is-decimal@^1.0.2:
is-decimal@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5"
integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==
Expand Down Expand Up @@ -8345,21 +8337,7 @@ mdast-util-mdxjs-esm@~0.1.0:
resolved "https://registry.yarnpkg.com/mdast-util-mdxjs-esm/-/mdast-util-mdxjs-esm-0.1.1.tgz#69134a0dad71a59a9e0e9cfdc0633dde31dff69a"
integrity sha512-kBiYeashz+nuhfv+712nc4THQhzXIH2gBFUDbuLxuDCqU/fZeg+9FAcdRBx9E13dkpk1p2Xwufzs3wsGJ+mISQ==

mdast-util-to-hast@^10.0.0:
version "10.0.1"
resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz#0cfc82089494c52d46eb0e3edb7a4eb2aea021eb"
integrity sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA==
dependencies:
"@types/mdast" "^3.0.0"
"@types/unist" "^2.0.0"
mdast-util-definitions "^4.0.0"
mdurl "^1.0.0"
unist-builder "^2.0.0"
unist-util-generated "^1.0.0"
unist-util-position "^3.0.0"
unist-util-visit "^2.0.0"

mdast-util-to-hast@^10.1.0:
mdast-util-to-hast@^10.0.0, mdast-util-to-hast@^10.1.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz#61875526a017d8857b71abc9333942700b2d3604"
integrity sha512-JoPBfJ3gBnHZ18icCwHR50orC9kNH81tiR1gs01D8Q5YpV6adHNO9nKNuFBCJQ941/32PT1a63UF/DitmS3amQ==
Expand Down Expand Up @@ -9274,7 +9252,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2"
integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==

[email protected], parse5@^6.0.1:
[email protected]:
version "6.0.1"
resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b"
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
Expand Down Expand Up @@ -10701,7 +10679,7 @@ remark-gfm@^1.0.0:
mdast-util-gfm "^0.1.0"
micromark-extension-gfm "^0.3.0"

remark-html@^13.0.1:
remark-html@^13.0.0:
version "13.0.1"
resolved "https://registry.yarnpkg.com/remark-html/-/remark-html-13.0.1.tgz#d5b2d8be01203e61fc37403167ca7584879ad675"
integrity sha512-K5KQCXWVz+harnyC+UVM/J9eJWCgjYRqFeZoZf2NgP0iFbuuw/RgMZv3MA34b/OEpGnstl3oiOUtZzD3tJ+CBw==
Expand All @@ -10710,14 +10688,6 @@ remark-html@^13.0.1:
hast-util-to-html "^7.0.0"
mdast-util-to-hast "^10.0.0"

remark-loader@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/remark-loader/-/remark-loader-4.0.0.tgz#a8afa003ce53726adbe5dc09a349b75e846db349"
integrity sha512-Bg+fQtqOAx3wCaHZxuLjN43JR9ducG/KO4ru+Adj6U8CuI7NsBQQkOfnf1YtxiPf4JP2Pt9FeJIbPWcVHWJqvw==
dependencies:
front-matter "^4.0.2"
vfile-reporter "^6.0.2"

[email protected]:
version "2.0.0-next.9"
resolved "https://registry.yarnpkg.com/remark-mdx/-/remark-mdx-2.0.0-next.9.tgz#3e2088550ddd4264ce48bca15fb297569d369e65"
Expand Down Expand Up @@ -10840,7 +10810,7 @@ renderkid@^2.0.6:
lodash "^4.17.21"
strip-ansi "^3.0.1"

repeat-string@^1.0.0, repeat-string@^1.5.0, repeat-string@^1.5.4:
repeat-string@^1.0.0, repeat-string@^1.5.4:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
Expand Down Expand Up @@ -11692,7 +11662,7 @@ string-width@^2.0.0, string-width@^2.1.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"

string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0:
string-width@^4.1.0, string-width@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
Expand Down Expand Up @@ -11774,7 +11744,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

stringify-entities@^3.0.0, stringify-entities@^3.1.0:
stringify-entities@^3.0.0, stringify-entities@^3.0.1, stringify-entities@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-3.1.0.tgz#b8d3feac256d9ffcc9fa1fefdcf3ca70576ee903"
integrity sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==
Expand All @@ -11783,17 +11753,6 @@ stringify-entities@^3.0.0, stringify-entities@^3.1.0:
character-entities-legacy "^1.0.0"
xtend "^4.0.0"

stringify-entities@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-3.0.1.tgz#32154b91286ab0869ab2c07696223bd23b6dbfc0"
integrity sha512-Lsk3ISA2++eJYqBMPKcr/8eby1I6L0gP0NlxF8Zja6c05yr/yCYyb2c9PwXjd08Ib3If1vn1rbs1H5ZtVuOfvQ==
dependencies:
character-entities-html4 "^1.0.0"
character-entities-legacy "^1.0.0"
is-alphanumerical "^1.0.0"
is-decimal "^1.0.2"
is-hexadecimal "^1.0.0"

stringify-object@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629"
Expand Down Expand Up @@ -11940,7 +11899,7 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"

supports-color@^6.0.0, supports-color@^6.1.0:
supports-color@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3"
integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==
Expand Down Expand Up @@ -12882,28 +12841,6 @@ vfile-message@^2.0.0:
"@types/unist" "^2.0.0"
unist-util-stringify-position "^2.0.0"

vfile-reporter@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-6.0.2.tgz#cbddaea2eec560f27574ce7b7b269822c191a676"
integrity sha512-GN2bH2gs4eLnw/4jPSgfBjo+XCuvnX9elHICJZjVD4+NM0nsUrMTvdjGY5Sc/XG69XVTgLwj7hknQVc6M9FukA==
dependencies:
repeat-string "^1.5.0"
string-width "^4.0.0"
supports-color "^6.0.0"
unist-util-stringify-position "^2.0.0"
vfile-sort "^2.1.2"
vfile-statistics "^1.1.0"

vfile-sort@^2.1.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/vfile-sort/-/vfile-sort-2.2.2.tgz#720fe067ce156aba0b411a01bb0dc65596aa1190"
integrity sha512-tAyUqD2R1l/7Rn7ixdGkhXLD3zsg+XLAeUDUhXearjfIcpL1Hcsj5hHpCoy/gvfK/Ws61+e972fm0F7up7hfYA==

vfile-statistics@^1.1.0:
version "1.1.4"
resolved "https://registry.yarnpkg.com/vfile-statistics/-/vfile-statistics-1.1.4.tgz#b99fd15ecf0f44ba088cc973425d666cb7a9f245"
integrity sha512-lXhElVO0Rq3frgPvFBwahmed3X03vjPF8OcjKMy8+F1xU/3Q3QU3tKEDp743SFtb74PdF0UWpxPvtOP0GCLheA==

vfile@^4.0.0, vfile@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/vfile/-/vfile-4.2.1.tgz#03f1dce28fc625c625bc6514350fbdb00fa9e624"
Expand Down