Skip to content

Commit

Permalink
Add package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ukriu committed Sep 18, 2024
1 parent eace54b commit 5d193c0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/*
pnpm-lock.yaml
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"scripts": {
"minify:html": "find . -name '*.html' -exec npx html-minifier-terser --collapse-whitespace --remove-comments --minify-js true --minify-css true -o {} {} \\;",
"minify:css": "find . -name '*.css' -exec npx cleancss -o {} {} \\;",
"minify:js": "find . -name '*.js' -exec npx terser --compress --mangle --output {} -- {} \\;",
"minify:json": "find . -name '*.json' -exec sh -c 'npx json-minify < \"$1\" > \"$1.tmp\" && mv \"$1.tmp\" \"$1\"' _ {} \\;",
"minify": "npm run minify:html && npm run minify:css && npm run minify:js && npm run minify:json"
},
"devDependencies": {
"html-minifier-terser": "*",
"clean-css-cli": "*",
"terser": "*",
"json-minify": "*"
}
}

0 comments on commit 5d193c0

Please sign in to comment.