Skip to content

Commit bfc50b8

Browse files
committed
Update markdownlint & webpack bundling
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
1 parent aa5a50f commit bfc50b8

File tree

5 files changed

+39
-17
lines changed

5 files changed

+39
-17
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"markdown-it-sub": "~1.0.0",
9696
"markdown-it-sup": "~1.0.0",
9797
"markdown-pdf": "~9.0.0",
98-
"markdownlint": "^0.16.0",
98+
"markdownlint": "^0.17.0",
9999
"mathjax": "~2.7.5",
100100
"mattermost-redux": "~5.13.0",
101101
"mermaid": "~8.2.3",

public/js/lib/editor/markdown-lint/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* global CodeMirror */
2-
import markdownlint from 'markdownlint'
2+
window.markdownit = require('markdown-it')
3+
require('script-loader!markdownlint')
34

45
// load CM lint plugin explicitly
56
import '@hackmd/codemirror/addon/lint/lint'
@@ -36,7 +37,7 @@ import './lint.css'
3637
})
3738

3839
function lint (content) {
39-
const { content: errors } = markdownlint.sync({
40+
const { content: errors } = window.markdownlint.sync({
4041
strings: {
4142
content
4243
}

public/js/url.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

webpack.common.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,7 @@ module.exports = {
167167
to: 'reveal.js/plugin'
168168
}
169169
]),
170-
new MiniCssExtractPlugin(),
171-
new webpack.NormalModuleReplacementPlugin(
172-
/^url$/,
173-
path.resolve(__dirname, './public/js/url.js')
174-
)
170+
new MiniCssExtractPlugin()
175171
],
176172

177173
entry: {
@@ -385,7 +381,8 @@ module.exports = {
385381
'emojify.js': path.join(__dirname, 'node_modules/@hackmd/emojify.js/dist/js/emojify-browser.min.js'),
386382
'markdown-it': path.join(__dirname, 'node_modules/markdown-it/dist/markdown-it.js'),
387383
'viz.js': path.join(__dirname, 'node_modules/viz.js/viz.js'),
388-
'viz.render.js': path.join(__dirname, 'node_modules/viz.js/full.render.js')
384+
'viz.render.js': path.join(__dirname, 'node_modules/viz.js/full.render.js'),
385+
markdownlint: path.join(__dirname, 'node_modules/markdownlint/demo/markdownlint-browser.js')
389386
}
390387
},
391388

yarn.lock

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,13 @@ after@0.8.2:
14101410
resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f"
14111411
integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=
14121412

1413+
agent-base@^4.3.0:
1414+
version "4.3.0"
1415+
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee"
1416+
integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==
1417+
dependencies:
1418+
es6-promisify "^5.0.0"
1419+
14131420
ajv-errors@^1.0.0:
14141421
version "1.0.1"
14151422
resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d"
@@ -4784,7 +4791,7 @@ entities@^1.1.1, entities@~1.1.1:
47844791
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
47854792
integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
47864793

4787-
entities@^2.0.0:
4794+
entities@^2.0.0, entities@~2.0.0:
47884795
version "2.0.0"
47894796
resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4"
47904797
integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==
@@ -4884,6 +4891,13 @@ es6-promise@^4.0.3:
48844891
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
48854892
integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==
48864893

4894+
es6-promisify@^5.0.0:
4895+
version "5.0.0"
4896+
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
4897+
integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=
4898+
dependencies:
4899+
es6-promise "^4.0.3"
4900+
48874901
es6-set@~0.1.5:
48884902
version "0.1.5"
48894903
resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1"
@@ -7925,7 +7939,18 @@ markdown-it-sup@~1.0.0:
79257939
resolved "https://registry.yarnpkg.com/markdown-it-sup/-/markdown-it-sup-1.0.0.tgz#cb9c9ff91a5255ac08f3fd3d63286e15df0a1fc3"
79267940
integrity sha1-y5yf+RpSVawI8/09YyhuFd8KH8M=
79277941

7928-
markdown-it@9.0.1, markdown-it@~9.0.1:
7942+
markdown-it@10.0.0:
7943+
version "10.0.0"
7944+
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc"
7945+
integrity sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==
7946+
dependencies:
7947+
argparse "^1.0.7"
7948+
entities "~2.0.0"
7949+
linkify-it "^2.0.0"
7950+
mdurl "^1.0.1"
7951+
uc.micro "^1.0.5"
7952+
7953+
markdown-it@~9.0.1:
79297954
version "9.0.1"
79307955
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-9.0.1.tgz#aafe363c43718720b6575fd10625cde6e4ff2d47"
79317956
integrity sha512-XC9dMBHg28Xi7y5dPuLjM61upIGPJG8AiHNHYqIaXER2KNnn7eKnM5/sF0ImNnyoV224Ogn9b1Pck8VH4k0bxw==
@@ -7956,12 +7981,12 @@ markdown-table@^1.1.0:
79567981
resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60"
79577982
integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==
79587983

7959-
markdownlint@^0.16.0:
7960-
version "0.16.0"
7961-
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.16.0.tgz#69f73cc755a44231fbe5dc7c37a5909cedc0ac6e"
7962-
integrity sha512-Zo+iPezP3eM6lLhKepkUw+X98H44lipIdx4d6faaugfB0+7VuDB3R0hXmx7z9F1N3/ypn46oOFgAD9iF++Ie6A==
7984+
markdownlint@^0.17.0:
7985+
version "0.17.2"
7986+
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.17.2.tgz#de0ab144fbf314fedadcb8a4ce0db9ea819f91a5"
7987+
integrity sha512-vsxopn0qEdm0P2XI3S9sVA+jvjKjR8lHZ+0FKlusth+1UK9tI29mRFkKeZPERmbWsMehJcogfMieBUkMgNEFkQ==
79637988
dependencies:
7964-
markdown-it "9.0.1"
7989+
markdown-it "10.0.0"
79657990

79667991
marked@~0.6.2:
79677992
version "0.6.3"

0 commit comments

Comments
 (0)