Add more metadata to WASM package.json

This commit is contained in:
Wilson Lin 2022-06-22 01:01:33 +10:00
parent 86e7ca8af1
commit 13d261048b
2 changed files with 29 additions and 3 deletions

View File

@ -11,9 +11,9 @@ wasm-pack build --target "$target"
pushd pkg
# `bundler` is for WASM/npm, `web` is for Deno.
if [[ "$target" = "bundler" ]]; then
# Use -i.tmp to support macOS and Linux.
sed -i.tmp -E 's%"name": "index"%"name": "@minify-html/wasm"%' package.json
rm package.json.tmp .gitignore
jq -s '.[0] * .[1]' package.json ../package.merge.json > package.new.json
mv package.new.json package.json
rm .gitignore
elif [[ "$target" = "web" ]]; then
rm package.json .gitignore
fi

26
wasm/package.merge.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "@minify-html/wasm",
"description": "Extremely fast and smart HTML + JS + CSS minifier",
"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"
},
"homepage": "https://github.com/wilsonzlin/minify-html#readme",
"keywords": [
"compress",
"compressor",
"fast",
"html",
"minifier",
"minify"
]
}