2021-04-05 23:43:55 -04:00
|
|
|
const fs = require("fs");
|
|
|
|
|
|
|
|
const common = {
|
2021-08-07 11:16:02 -04:00
|
|
|
version: "0.5.0",
|
2021-04-05 23:43:55 -04:00
|
|
|
main: "index.node",
|
|
|
|
types: "index.d.ts",
|
|
|
|
files: ["postinstall.js", "index.d.ts"],
|
|
|
|
scripts: {
|
2021-04-06 00:09:20 -04:00
|
|
|
build: "node-gyp build && shx mv build/Release/index.node index.node",
|
2021-04-05 23:43:55 -04:00
|
|
|
clean:
|
|
|
|
"cd native && cargo clean && cd .. && node-gyp clean && node-gyp configure && shx rm -f index.node",
|
|
|
|
postinstall: "node postinstall.js",
|
|
|
|
},
|
|
|
|
repository: {
|
|
|
|
type: "git",
|
|
|
|
url: "git+https://github.com/wilsonzlin/minify-html.git",
|
|
|
|
},
|
|
|
|
author: {
|
|
|
|
email: "npm@wilsonl.in",
|
|
|
|
name: "Wilson Lin",
|
|
|
|
url: "https://wilsonl.in/",
|
|
|
|
},
|
|
|
|
license: "MIT",
|
|
|
|
bugs: {
|
|
|
|
url: "https://github.com/wilsonzlin/minify-html/issues",
|
|
|
|
},
|
|
|
|
engines: {
|
|
|
|
node: ">= 8.6.0",
|
|
|
|
},
|
|
|
|
homepage: "https://github.com/wilsonzlin/minify-html#readme",
|
|
|
|
devDependencies: {
|
|
|
|
"@types/node": "^14.6.0",
|
|
|
|
"node-gyp": "^7.0.0",
|
|
|
|
shx: "^0.3.2",
|
|
|
|
},
|
|
|
|
keywords: ["compress", "compressor", "fast", "html", "minifier", "minify"],
|
|
|
|
};
|
|
|
|
|
|
|
|
const specifics = {
|
|
|
|
core: {
|
|
|
|
name: "@minify-html/core",
|
|
|
|
description: "Extremely fast and smart HTML minifier",
|
|
|
|
},
|
|
|
|
js: {
|
|
|
|
name: "@minify-html/js",
|
|
|
|
description: "Extremely fast and smart HTML + JS + CSS minifier",
|
|
|
|
},
|
|
|
|
}[process.argv[2]];
|
|
|
|
|
|
|
|
fs.writeFileSync(
|
|
|
|
"package.json",
|
|
|
|
JSON.stringify(
|
|
|
|
{
|
|
|
|
...common,
|
|
|
|
...specifics,
|
|
|
|
},
|
|
|
|
null,
|
|
|
|
2
|
|
|
|
)
|
|
|
|
);
|