Update markdownlint-micromark to build scripts for web in addition to Node.

This commit is contained in:
David Anson 2023-02-07 21:46:21 -08:00
parent ddb71ed1e8
commit f8e793786a
3 changed files with 56 additions and 10 deletions

View file

@ -2,33 +2,75 @@
"use strict";
const shared = {
const base = {
"entry": "./exports.mjs",
"output": {
"path": __dirname
}
};
const commonjs = {
...base,
"output": {
...base.output,
"library": {
"type": "commonjs"
},
"path": __dirname
}
},
"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 = [
{
...shared,
"mode": "production",
...commonjs,
...production,
"output": {
...shared.output,
...commonjs.output,
"filename": "micromark.cjs"
}
},
{
...shared,
"devtool": false,
"mode": "development",
...commonjs,
...development,
"output": {
...shared.output,
...commonjs.output,
"filename": "micromark.dev.cjs"
}
},
{
...web,
...production,
"output": {
...commonjs.output,
"filename": "micromark-browser.js"
}
},
{
...web,
...development,
"output": {
...commonjs.output,
"filename": "micromark-browser.dev.js"
}
}
];