Add name/version/homepage banner to markdownlint-micromark artifacts.

This commit is contained in:
David Anson 2023-06-23 03:36:07 +00:00
parent 8fb6287300
commit 272c15ed39
2 changed files with 24 additions and 2 deletions

View file

@ -23,6 +23,7 @@
"micromark-extension-gfm-autolink-literal": "1.0.5", "micromark-extension-gfm-autolink-literal": "1.0.5",
"micromark-extension-gfm-footnote": "1.1.2", "micromark-extension-gfm-footnote": "1.1.2",
"micromark-extension-gfm-table": "1.0.7", "micromark-extension-gfm-table": "1.0.7",
"terser-webpack-plugin": "5.3.9",
"webpack": "5.88.0", "webpack": "5.88.0",
"webpack-cli": "5.1.4" "webpack-cli": "5.1.4"
} }

View file

@ -2,6 +2,10 @@
"use strict"; "use strict";
const webpack = require("webpack");
const TerserPlugin = require("terser-webpack-plugin");
const { name, version, homepage } = require("./package.json");
const htmlEntry = "./exports-html.mjs"; const htmlEntry = "./exports-html.mjs";
const htmlName = "micromarkHtmlBrowser"; const htmlName = "micromarkHtmlBrowser";
@ -9,7 +13,12 @@ const base = {
"entry": "./exports.mjs", "entry": "./exports.mjs",
"output": { "output": {
"path": __dirname "path": __dirname
} },
"plugins": [
new webpack.BannerPlugin({
"banner": `${name} ${version} ${homepage}`
})
]
}; };
const commonjs = { const commonjs = {
@ -36,7 +45,19 @@ const web = {
}; };
const production = { const production = {
"mode": "production" "mode": "production",
"optimization": {
"minimizer": [
new TerserPlugin({
"extractComments": false,
"terserOptions": {
"compress": {
"passes": 2
}
}
})
]
}
}; };
const development = { const development = {