From b4921781d0662629c5630062ca8068efc15daa64 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Sat, 14 Aug 2021 22:12:59 +0800 Subject: [PATCH 01/15] fetch readme.md as mdx --- src/utilities/fetch-package-readmes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utilities/fetch-package-readmes.js b/src/utilities/fetch-package-readmes.js index e1b3fb638ac6..a95ca867f8e8 100644 --- a/src/utilities/fetch-package-readmes.js +++ b/src/utilities/fetch-package-readmes.js @@ -34,7 +34,7 @@ async function main() { const url = `https://raw.githubusercontent.com/${repo}/master/README.md`; const htmlUrl = `https://github.com/${repo}`; const editUrl = `${htmlUrl}/edit/master/README.md`; - const fileName = path.resolve(outputDir, `_${packageName}.md`); + const fileName = path.resolve(outputDir, `_${packageName}.mdx`); let title = packageName; From 8a978404bc465d24298a9d67effba6d97d6aa65f Mon Sep 17 00:00:00 2001 From: chenxsan Date: Sun, 15 Aug 2021 08:50:47 +0800 Subject: [PATCH 02/15] close opened img tags --- src/utilities/process-readme.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utilities/process-readme.js b/src/utilities/process-readme.js index f2abf877908c..20e6a8ff3bfe 100644 --- a/src/utilities/process-readme.js +++ b/src/utilities/process-readme.js @@ -98,6 +98,11 @@ module.exports = function processREADME(body, options = {}) { let parsed = content.match(/

\s+([^]*?)\s+<\/?p>/); return parsed ? parsed[1] : ''; }) + // close tags + .replace( + /<(img\s[^>]*?src\s*=\s*['"][^'"]*?['"][^>/]*?)>(?![^<]*<\/img)/g, + '<$1/>' + ) // Replace lone h1 formats .replace(/.+?<\/h1>/, '') .replace(/^# .+/m, '') From 557e4e930c0fdc66b0f5e5a7d8d70c000a694ae8 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Mon, 16 Aug 2021 21:24:03 +0800 Subject: [PATCH 03/15] fix regular expression to contain nested div[align="center"] --- src/utilities/process-readme.js | 2 +- src/utilities/process-readme.test.js | 31 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/utilities/process-readme.js b/src/utilities/process-readme.js index 20e6a8ff3bfe..896acdd3ed61 100644 --- a/src/utilities/process-readme.js +++ b/src/utilities/process-readme.js @@ -94,7 +94,7 @@ module.exports = function processREADME(body, options = {}) { let processingString = body // remove items other than paragraphs in div[align="center"] // e.g., logo, title and so on. - .replace(/[^]*?

([^]*?)<\/div>/, (match, content) => { + .replace(/[^]*?
([^]*)<\/div>/, (match, content) => { let parsed = content.match(/

\s+([^]*?)\s+<\/?p>/); return parsed ? parsed[1] : ''; }) diff --git a/src/utilities/process-readme.test.js b/src/utilities/process-readme.test.js index 0dae2439f6ff..5fa0bb19a86a 100644 --- a/src/utilities/process-readme.test.js +++ b/src/utilities/process-readme.test.js @@ -59,4 +59,35 @@ describe('processReadme', () => {

`; expect(processReadme(loaderMDData)).toEqual(''); }); + + it('should clean up div[align="center"] with nested dev[align="center"]', () => { + // see https://raw.githubusercontent.com/webpack-contrib/postcss-loader/master/README.md + const loaderMDData = ` +
+ PostCSS Logo + + + +
+ + Sponsored by Evil Martians + +
+
`; + expect(processReadme(loaderMDData)).toEqual(''); + }); }); From 40ba6913f13f0e03a48f8c502211276db3b2acd1 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Tue, 17 Aug 2021 19:37:40 +0800 Subject: [PATCH 04/15] Revert "fix regular expression to contain nested div[align="center"]" This reverts commit 557e4e930c0fdc66b0f5e5a7d8d70c000a694ae8. --- src/utilities/process-readme.js | 2 +- src/utilities/process-readme.test.js | 31 ---------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/utilities/process-readme.js b/src/utilities/process-readme.js index 896acdd3ed61..20e6a8ff3bfe 100644 --- a/src/utilities/process-readme.js +++ b/src/utilities/process-readme.js @@ -94,7 +94,7 @@ module.exports = function processREADME(body, options = {}) { let processingString = body // remove items other than paragraphs in div[align="center"] // e.g., logo, title and so on. - .replace(/[^]*?
([^]*)<\/div>/, (match, content) => { + .replace(/[^]*?
([^]*?)<\/div>/, (match, content) => { let parsed = content.match(/

\s+([^]*?)\s+<\/?p>/); return parsed ? parsed[1] : ''; }) diff --git a/src/utilities/process-readme.test.js b/src/utilities/process-readme.test.js index 5fa0bb19a86a..0dae2439f6ff 100644 --- a/src/utilities/process-readme.test.js +++ b/src/utilities/process-readme.test.js @@ -59,35 +59,4 @@ describe('processReadme', () => {

`; expect(processReadme(loaderMDData)).toEqual(''); }); - - it('should clean up div[align="center"] with nested dev[align="center"]', () => { - // see https://raw.githubusercontent.com/webpack-contrib/postcss-loader/master/README.md - const loaderMDData = ` -
- PostCSS Logo - - - -
- - Sponsored by Evil Martians - -
-
`; - expect(processReadme(loaderMDData)).toEqual(''); - }); }); From 0ebcdeab72c6f96d8af3bc1b4f583332c67f1bb4 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Tue, 17 Aug 2021 20:48:33 +0800 Subject: [PATCH 05/15] optimize cleanup --- .../__snapshots__/index.test.js.snap | 40 ++++++++++ .../remark-cleanup-readme/index.js | 23 ++++++ .../remark-cleanup-readme/index.test.js | 74 +++++++++++++++++++ src/utilities/process-readme.js | 6 -- src/utilities/process-readme.test.js | 31 -------- webpack.common.js | 1 + 6 files changed, 138 insertions(+), 37 deletions(-) create mode 100644 src/remark-plugins/remark-cleanup-readme/__snapshots__/index.test.js.snap create mode 100644 src/remark-plugins/remark-cleanup-readme/index.js create mode 100644 src/remark-plugins/remark-cleanup-readme/index.test.js diff --git a/src/remark-plugins/remark-cleanup-readme/__snapshots__/index.test.js.snap b/src/remark-plugins/remark-cleanup-readme/__snapshots__/index.test.js.snap new file mode 100644 index 000000000000..69aa6a9a301e --- /dev/null +++ b/src/remark-plugins/remark-cleanup-readme/__snapshots__/index.test.js.snap @@ -0,0 +1,40 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`cleanup readme should clean up div[align="center"] block with paragraph 1`] = ` +"/* @jsxRuntime classic */ +/* @jsx mdx */ +/* @jsxFrag mdx.Fragment */ +const MDXLayout = \\"wrapper\\"; +function MDXContent({components, ...props}) { + return

{\\"Imagemin Webpack\\"}

{\\"Plugin and Loader for \\"}{\\"webpack\\"}{\\" to optimize (compress) all images using \\"}{\\"imagemin\\"}{\\".\\\\nDo not worry about size of images, now they are always optimized/compressed.\\"}

; +} +MDXContent.isMDXComponent = true; +export default MDXContent; +" +`; + +exports[`cleanup readme should clean up div[align="center"] block without paragraph 1`] = ` +"/* @jsxRuntime classic */ +/* @jsx mdx */ +/* @jsxFrag mdx.Fragment */ +const MDXLayout = \\"wrapper\\"; +function MDXContent({components, ...props}) { + return
; +} +MDXContent.isMDXComponent = true; +export default MDXContent; +" +`; + +exports[`cleanup readme should clean up nested div[align="center"] block 1`] = ` +"/* @jsxRuntime classic */ +/* @jsx mdx */ +/* @jsxFrag mdx.Fragment */ +const MDXLayout = \\"wrapper\\"; +function MDXContent({components, ...props}) { + return
; +} +MDXContent.isMDXComponent = true; +export default MDXContent; +" +`; diff --git a/src/remark-plugins/remark-cleanup-readme/index.js b/src/remark-plugins/remark-cleanup-readme/index.js new file mode 100644 index 000000000000..c857c4f861a1 --- /dev/null +++ b/src/remark-plugins/remark-cleanup-readme/index.js @@ -0,0 +1,23 @@ +const visit = require('unist-util-visit'); +// remove items other than paragraphs in div[align="center"] +// e.g., logo, title and so on. +// see the original version at https://github.com/webpack/webpack.js.org/blob/webpack-4/src/utilities/process-readme.js#L71 +module.exports = function remarkCleanupReadme() { + return function transformer(tree) { + visit(tree, 'mdxJsxFlowElement', visitor); + function visitor(node) { + const alignAttribute = node.attributes.find( + (attribute) => + attribute.name === 'align' && attribute.value === 'center' + ); + if (alignAttribute) { + const paragraphs = node.children.filter( + (child) => + child.type === 'paragraph' || + (child.type === 'mdxJsxFlowElement' && child.name === 'p') + ); + node.children = paragraphs; + } + } + }; +}; diff --git a/src/remark-plugins/remark-cleanup-readme/index.test.js b/src/remark-plugins/remark-cleanup-readme/index.test.js new file mode 100644 index 000000000000..5d9e73ca5da3 --- /dev/null +++ b/src/remark-plugins/remark-cleanup-readme/index.test.js @@ -0,0 +1,74 @@ +const mdx = require('@mdx-js/mdx'); +describe('cleanup readme', () => { + it('should clean up div[align="center"] block without paragraph', () => { + const mdxText = ` + +`; + const html = mdx.sync(mdxText, { + remarkPlugins: [require('./index.js')], + }); + expect(html).toMatchSnapshot(); + }); + + it('should clean up div[align="center"] block with paragraph', () => { + const mdxText = ` +
+ + + +

Imagemin Webpack

+

+ Plugin and Loader for webpack to optimize (compress) all images using imagemin. + Do not worry about size of images, now they are always optimized/compressed. +

+
+ `; + const html = mdx.sync(mdxText, { + remarkPlugins: [require('./index.js')], + }); + expect(html).toMatchSnapshot(); + }); + + it('should clean up nested div[align="center"] block ', () => { + // see https://github.com/webpack-contrib/postcss-loader/blob/master/README.md + const mdxText = ` +
+ PostCSS Logo + + + +
+ + Sponsored by Evil Martians + +
+
+ `; + const html = mdx.sync(mdxText, { + remarkPlugins: [require('./index.js')], + }); + expect(html).toMatchSnapshot(); + }); +}); diff --git a/src/utilities/process-readme.js b/src/utilities/process-readme.js index 20e6a8ff3bfe..066ab289ec72 100644 --- a/src/utilities/process-readme.js +++ b/src/utilities/process-readme.js @@ -92,12 +92,6 @@ function getMatches(string, regex) { module.exports = function processREADME(body, options = {}) { let processingString = body - // remove items other than paragraphs in div[align="center"] - // e.g., logo, title and so on. - .replace(/[^]*?
([^]*?)<\/div>/, (match, content) => { - let parsed = content.match(/

\s+([^]*?)\s+<\/?p>/); - return parsed ? parsed[1] : ''; - }) // close tags .replace( /<(img\s[^>]*?src\s*=\s*['"][^'"]*?['"][^>/]*?)>(?![^<]*<\/img)/g, diff --git a/src/utilities/process-readme.test.js b/src/utilities/process-readme.test.js index 0dae2439f6ff..ac93b9a5114b 100644 --- a/src/utilities/process-readme.test.js +++ b/src/utilities/process-readme.test.js @@ -28,35 +28,4 @@ describe('processReadme', () => { '- [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin)' ); }); - - it('should clean up div[align="center"] block with paragraph', () => { - const loaderMDData = ` -

- - - -

Imagemin Webpack

-

- Plugin and Loader for webpack to optimize (compress) all images using imagemin. - Do not worry about size of images, now they are always optimized/compressed. -

-
`; - expect(processReadme(loaderMDData)) - .toEqual(`Plugin and Loader for webpack to optimize (compress) all images using imagemin. - Do not worry about size of images, now they are always optimized/compressed.`); - }); - - it('should clean up div[align="center"] block without paragraph', () => { - const loaderMDData = ` -`; - expect(processReadme(loaderMDData)).toEqual(''); - }); }); diff --git a/webpack.common.js b/webpack.common.js index 6b7dc2374071..f8a86792a8a3 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -8,6 +8,7 @@ const mdPlugins = [ require('remark-slug'), remarkResponsiveTable, require('remark-emoji'), + require('./src/remark-plugins/remark-cleanup-readme/index.js'), [ require('./src/remark-plugins/remark-custom-asides/index.js'), { From cefbf55060470c17e8a58b29987de868ce3eba16 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Tue, 17 Aug 2021 21:44:31 +0800 Subject: [PATCH 06/15] use mdx for printable --- .gitignore | 2 +- package.json | 2 +- src/components/Site/Site.jsx | 2 +- src/scripts/concatenate-docs.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e961bbecbdd5..e1ad0f31030a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,5 @@ package-lock.json .cache internal-links.tap stats.json -printable.md +printable.mdx repositories/*.json diff --git a/package.json b/package.json index cc3a0959efbf..cb2cd4e01f71 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "scripts": { "clean-dist": "rimraf ./dist", - "clean-printable": "rimraf src/content/**/printable.md", + "clean-printable": "rimraf src/content/**/printable.mdx", "preclean": "run-s clean-dist clean-printable", "clean": "rimraf src/content/**/_*.md src/**/_*.json repositories/*.json", "start": "npm run clean-dist && webpack serve --config webpack.dev.js --env dev --progress --node-env development", diff --git a/src/components/Site/Site.jsx b/src/components/Site/Site.jsx index bfde423d3cdb..3d2817cd0473 100644 --- a/src/components/Site/Site.jsx +++ b/src/components/Site/Site.jsx @@ -98,7 +98,7 @@ function Site(props) { })) .filter( (page) => - page.title !== 'printable.md' && !page.content.includes('Printable') + page.title !== 'printable.mdx' && !page.content.includes('Printable') ); }; diff --git a/src/scripts/concatenate-docs.js b/src/scripts/concatenate-docs.js index 7885ed25d93c..b801dee7fcdb 100644 --- a/src/scripts/concatenate-docs.js +++ b/src/scripts/concatenate-docs.js @@ -5,7 +5,7 @@ const front = require('front-matter'); // root path const rootPath = path.join('src', 'content'); -const outFileName = 'printable.md'; +const outFileName = 'printable.mdx'; console.info( 'Concatenating *.md files of each content directory to create chapter-wide help files to be used for printing' From 08aa5bd412e8dcddc8b7ac37287033b47d6e20d8 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 19:19:09 +0800 Subject: [PATCH 07/15] concatenate mdx --- src/scripts/concatenate-docs.js | 34 ++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/scripts/concatenate-docs.js b/src/scripts/concatenate-docs.js index b801dee7fcdb..6d5aaaa1886c 100644 --- a/src/scripts/concatenate-docs.js +++ b/src/scripts/concatenate-docs.js @@ -8,13 +8,13 @@ const rootPath = path.join('src', 'content'); const outFileName = 'printable.mdx'; console.info( - 'Concatenating *.md files of each content directory to create chapter-wide help files to be used for printing' + 'Concatenating *.mdx files of each content directory to create chapter-wide help files to be used for printing' ); // getDirectoryRecursive() recursively walks through all sub directories of the provided path -// concatenates the .md files content in each directory, sorted by their FrontMatter sort -// attribute, and creates a compound MarkDown file named by using the directory name, -// prefixed by an underscore and suffixed by '_all.md' from the concatenated content +// concatenates the .mdx files content in each directory, sorted by their FrontMatter sort +// attribute, and creates a compound mdx file named by using the directory name, +// prefixed by an underscore and suffixed by '_all.mdx' from the concatenated content // in the corresponding directory. function getDirectoryRecursive(basePath) { console.log(`Processing: ${basePath}`); @@ -28,20 +28,33 @@ function getDirectoryRecursive(basePath) { let fileContents = []; - for (let file of fileNames) { + for (let file of fileNames.filter((fileName) => + fileName.includes('printable') + )) { const fullPath = path.join(basePath, file); // if the directory entry is a directory, recurse into that directory if (fs.statSync(fullPath).isDirectory()) { getDirectoryRecursive(fullPath); - } else if (fullPath.endsWith('.md') || fullPath.endsWith('.mdx')) { - fileContents[fileContents.length] = front( - fs.readFileSync(fullPath).toString() - ); + } else if (fullPath.endsWith('.mdx')) { + // import the respective mdx file + const basename = path + .basename(file, '.mdx') + .split('-') + .map((x) => x.toUpperCase()) + .join(''); + fileContents[fileContents.length] = { + ...front(fs.readFileSync(fullPath).toString()), + body: ` +import ${basename} from './${file}' + +<${basename} /> +`, + }; } } - // sort MarkDown files by FrontMatter 'sort' attribute (QuickSort) + // sort mdx files by FrontMatter 'sort' attribute (QuickSort) for (let i = 0; i < fileContents.length - 1; ++i) for (let j = i + 1; j < fileContents.length; ++j) { const left = fileContents[i].attributes; @@ -73,7 +86,6 @@ contributors: targetFile.on('error', (error) => { throw error; }); - for (let file of fileContents) { // use FrontMatter 'title' attribute as main heading of target file targetFile.write(os.EOL + os.EOL + '# ' + file.attributes.title + os.EOL); From 83b8161c1dcfd535da834411f335589022d131ee Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 19:26:30 +0800 Subject: [PATCH 08/15] fix --- src/scripts/concatenate-docs.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scripts/concatenate-docs.js b/src/scripts/concatenate-docs.js index 6d5aaaa1886c..f8c273a707c5 100644 --- a/src/scripts/concatenate-docs.js +++ b/src/scripts/concatenate-docs.js @@ -38,6 +38,7 @@ function getDirectoryRecursive(basePath) { getDirectoryRecursive(fullPath); } else if (fullPath.endsWith('.mdx')) { // import the respective mdx file + // prefix a `W` to prevent filename like 12345.mdx const basename = path .basename(file, '.mdx') .split('-') @@ -46,9 +47,9 @@ function getDirectoryRecursive(basePath) { fileContents[fileContents.length] = { ...front(fs.readFileSync(fullPath).toString()), body: ` -import ${basename} from './${file}' +import W${basename} from './${file}' -<${basename} /> + `, }; } From 4e5df5cb88f2b0acfbe8d28506c6dd060f4e71e7 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 19:29:29 +0800 Subject: [PATCH 09/15] revert --- src/scripts/concatenate-docs.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/scripts/concatenate-docs.js b/src/scripts/concatenate-docs.js index f8c273a707c5..8f665cde2b31 100644 --- a/src/scripts/concatenate-docs.js +++ b/src/scripts/concatenate-docs.js @@ -28,9 +28,7 @@ function getDirectoryRecursive(basePath) { let fileContents = []; - for (let file of fileNames.filter((fileName) => - fileName.includes('printable') - )) { + for (let file of fileNames) { const fullPath = path.join(basePath, file); // if the directory entry is a directory, recurse into that directory From 23cf1bb58ff3b27fe9b55d46bfeee668b5aef603 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 19:48:46 +0800 Subject: [PATCH 10/15] disable concatenate docs --- src/scripts/concatenate-docs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/concatenate-docs.js b/src/scripts/concatenate-docs.js index 8f665cde2b31..ae2f7d1b1538 100644 --- a/src/scripts/concatenate-docs.js +++ b/src/scripts/concatenate-docs.js @@ -95,7 +95,8 @@ contributors: }); } -getDirectoryRecursive(rootPath); +// getDirectoryRecursive(rootPath); +console.log(getDirectoryRecursive); // end message process.on('exit', () => From f673c88cbec726934a5eca5f295e99c42c7cd837 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 19:57:18 +0800 Subject: [PATCH 11/15] disable all loaders for testing --- src/utilities/constants.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/utilities/constants.js b/src/utilities/constants.js index e40ff399808c..5997cc67eef7 100644 --- a/src/utilities/constants.js +++ b/src/utilities/constants.js @@ -23,6 +23,23 @@ const excludedLoaders = [ 'webpack-contrib/null-loader', 'webpack-contrib/mocha-loader', 'webpack-contrib/istanbul-instrumenter-loader', + 'webpack-contrib/css-loader', + 'webpack-contrib/style-loader', + 'webpack-contrib/less-loader', + 'webpack-contrib/val-loader', + 'webpack-contrib/worker-loader', + 'webpack-contrib/imports-loader', + 'webpack-contrib/exports-loader', + 'webpack-contrib/expose-loader', + 'webpack-contrib/node-loader', + 'webpack-contrib/stylus-loader', + 'webpack-contrib/html-loader', + 'webpack-contrib/sass-loader', + 'webpack-contrib/source-map-loader', + 'webpack-contrib/postcss-loader', + 'webpack-contrib/thread-loader', + 'webpack-contrib/remark-loader', + 'babel/babel-loader', ]; const excludedPlugins = [ 'webpack-contrib/component-webpack-plugin', From e95b09f3c75d0ee0a643e30d119c271820ddb233 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 20:07:51 +0800 Subject: [PATCH 12/15] disable all plugins for testing --- src/utilities/constants.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/utilities/constants.js b/src/utilities/constants.js index 5997cc67eef7..e041186914e1 100644 --- a/src/utilities/constants.js +++ b/src/utilities/constants.js @@ -49,6 +49,17 @@ const excludedPlugins = [ 'webpack-contrib/uglifyjs-webpack-plugin', 'webpack-contrib/zopfli-webpack-plugin', 'webpack-contrib/closure-webpack-plugin', + 'webpack-contrib/compression-webpack-plugin', + 'webpack-contrib/copy-webpack-plugin', + 'webpack-contrib/install-webpack-plugin', + 'webpack-contrib/stylelint-webpack-plugin', + 'webpack-contrib/image-minimizer-webpack-plugin', + 'webpack-contrib/mini-css-extract-plugin', + 'webpack-contrib/terser-webpack-plugin', + 'webpack-contrib/css-minimizer-webpack-plugin', + 'webpack-contrib/eslint-webpack-plugin', + 'webpack-contrib/html-minimizer-webpack-plugin', + 'webpack-contrib/json-minimizer-webpack-plugin', ]; module.exports = { From 37e40dadf17a7975447295e6f4cc569fe7eb65b7 Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 21:06:04 +0800 Subject: [PATCH 13/15] Revert "disable concatenate docs" This reverts commit 23cf1bb58ff3b27fe9b55d46bfeee668b5aef603. --- src/scripts/concatenate-docs.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/scripts/concatenate-docs.js b/src/scripts/concatenate-docs.js index ae2f7d1b1538..8f665cde2b31 100644 --- a/src/scripts/concatenate-docs.js +++ b/src/scripts/concatenate-docs.js @@ -95,8 +95,7 @@ contributors: }); } -// getDirectoryRecursive(rootPath); -console.log(getDirectoryRecursive); +getDirectoryRecursive(rootPath); // end message process.on('exit', () => From 70f5714ae5b9e6f36fb629647f975f3e9d08155b Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 21:38:24 +0800 Subject: [PATCH 14/15] Revert "disable all loaders for testing" This reverts commit f673c88cbec726934a5eca5f295e99c42c7cd837. --- src/utilities/constants.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/utilities/constants.js b/src/utilities/constants.js index e041186914e1..e45e9aac535b 100644 --- a/src/utilities/constants.js +++ b/src/utilities/constants.js @@ -23,23 +23,6 @@ const excludedLoaders = [ 'webpack-contrib/null-loader', 'webpack-contrib/mocha-loader', 'webpack-contrib/istanbul-instrumenter-loader', - 'webpack-contrib/css-loader', - 'webpack-contrib/style-loader', - 'webpack-contrib/less-loader', - 'webpack-contrib/val-loader', - 'webpack-contrib/worker-loader', - 'webpack-contrib/imports-loader', - 'webpack-contrib/exports-loader', - 'webpack-contrib/expose-loader', - 'webpack-contrib/node-loader', - 'webpack-contrib/stylus-loader', - 'webpack-contrib/html-loader', - 'webpack-contrib/sass-loader', - 'webpack-contrib/source-map-loader', - 'webpack-contrib/postcss-loader', - 'webpack-contrib/thread-loader', - 'webpack-contrib/remark-loader', - 'babel/babel-loader', ]; const excludedPlugins = [ 'webpack-contrib/component-webpack-plugin', From 2ef45a14fd2f7d3943b34ba6bba7ebc3837e4d3a Mon Sep 17 00:00:00 2001 From: chenxsan Date: Wed, 18 Aug 2021 21:44:14 +0800 Subject: [PATCH 15/15] Revert "disable all plugins for testing" This reverts commit e95b09f3c75d0ee0a643e30d119c271820ddb233. --- src/utilities/constants.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/utilities/constants.js b/src/utilities/constants.js index e45e9aac535b..e40ff399808c 100644 --- a/src/utilities/constants.js +++ b/src/utilities/constants.js @@ -32,17 +32,6 @@ const excludedPlugins = [ 'webpack-contrib/uglifyjs-webpack-plugin', 'webpack-contrib/zopfli-webpack-plugin', 'webpack-contrib/closure-webpack-plugin', - 'webpack-contrib/compression-webpack-plugin', - 'webpack-contrib/copy-webpack-plugin', - 'webpack-contrib/install-webpack-plugin', - 'webpack-contrib/stylelint-webpack-plugin', - 'webpack-contrib/image-minimizer-webpack-plugin', - 'webpack-contrib/mini-css-extract-plugin', - 'webpack-contrib/terser-webpack-plugin', - 'webpack-contrib/css-minimizer-webpack-plugin', - 'webpack-contrib/eslint-webpack-plugin', - 'webpack-contrib/html-minimizer-webpack-plugin', - 'webpack-contrib/json-minimizer-webpack-plugin', ]; module.exports = {