mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update markdownlint-micromark to build scripts for web in addition to Node.
This commit is contained in:
parent
ddb71ed1e8
commit
f8e793786a
3 changed files with 56 additions and 10 deletions
|
@ -17,6 +17,8 @@
|
||||||
"example/typescript/type-check.js",
|
"example/typescript/type-check.js",
|
||||||
"micromark/micromark.cjs",
|
"micromark/micromark.cjs",
|
||||||
"micromark/micromark.dev.cjs",
|
"micromark/micromark.dev.cjs",
|
||||||
|
"micromark/micromark-browser.js",
|
||||||
|
"micromark/micromark-browser.dev.js",
|
||||||
"test-repos/"
|
"test-repos/"
|
||||||
],
|
],
|
||||||
"overrides": [
|
"overrides": [
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,6 +3,8 @@ demo/markdown-it.min.js
|
||||||
demo/markdownlint-browser.min.js
|
demo/markdownlint-browser.min.js
|
||||||
micromark/micromark.cjs
|
micromark/micromark.cjs
|
||||||
micromark/micromark.dev.cjs
|
micromark/micromark.dev.cjs
|
||||||
|
micromark/micromark-browser.js
|
||||||
|
micromark/micromark-browser.dev.js
|
||||||
node_modules
|
node_modules
|
||||||
!test/node_modules
|
!test/node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
|
@ -2,33 +2,75 @@
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const shared = {
|
const base = {
|
||||||
"entry": "./exports.mjs",
|
"entry": "./exports.mjs",
|
||||||
"output": {
|
"output": {
|
||||||
|
"path": __dirname
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const commonjs = {
|
||||||
|
...base,
|
||||||
|
"output": {
|
||||||
|
...base.output,
|
||||||
"library": {
|
"library": {
|
||||||
"type": "commonjs"
|
"type": "commonjs"
|
||||||
},
|
}
|
||||||
"path": __dirname
|
|
||||||
},
|
},
|
||||||
"target": "node"
|
"target": "node"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const web = {
|
||||||
|
...base,
|
||||||
|
"output": {
|
||||||
|
...base.output,
|
||||||
|
"library": {
|
||||||
|
"type": "var"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"target": "web"
|
||||||
|
};
|
||||||
|
|
||||||
|
const production = {
|
||||||
|
"mode": "production"
|
||||||
|
};
|
||||||
|
|
||||||
|
const development = {
|
||||||
|
"devtool": false,
|
||||||
|
"mode": "development"
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
{
|
{
|
||||||
...shared,
|
...commonjs,
|
||||||
"mode": "production",
|
...production,
|
||||||
"output": {
|
"output": {
|
||||||
...shared.output,
|
...commonjs.output,
|
||||||
"filename": "micromark.cjs"
|
"filename": "micromark.cjs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
...shared,
|
...commonjs,
|
||||||
"devtool": false,
|
...development,
|
||||||
"mode": "development",
|
|
||||||
"output": {
|
"output": {
|
||||||
...shared.output,
|
...commonjs.output,
|
||||||
"filename": "micromark.dev.cjs"
|
"filename": "micromark.dev.cjs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...web,
|
||||||
|
...production,
|
||||||
|
"output": {
|
||||||
|
...commonjs.output,
|
||||||
|
"filename": "micromark-browser.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
...web,
|
||||||
|
...development,
|
||||||
|
"output": {
|
||||||
|
...commonjs.output,
|
||||||
|
"filename": "micromark-browser.dev.js"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue