forked from wilsonzlin/minify-html
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json.gen.js
More file actions
60 lines (57 loc) · 1.34 KB
/
package.json.gen.js
File metadata and controls
60 lines (57 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const fs = require("fs");
const common = {
version: "0.4.10",
main: "index.node",
types: "index.d.ts",
files: ["postinstall.js", "index.d.ts"],
scripts: {
build: "node-gyp build && shx mv build/Release/index.node index.node",
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
)
);