Browse Source

Minify through npx instead of global package

Alexandre Dieulot 2 năm trước cách đây
mục cha
commit
31ccb3667d
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      README.md
  2. 1 1
      package.json

+ 1 - 1
README.md

@@ -18,4 +18,4 @@ And access http://127.0.0.1:8000/. Or specify another port with an argument afte
 
 ## Minifying
 
-To minify instantpage.js into instantpage.min.js install uglify-es globally (`npm i uglify-es -g`) then run `npm run minify`.
+To minify instantpage.js into instantpage.min.js, run `npm run minify`.

+ 1 - 1
package.json

@@ -7,7 +7,7 @@
     "test": "test"
   },
   "scripts": {
-    "minify": "uglifyjs ./instantpage.js --compress --mangle --toplevel --comments \"/^!/\" --output ./instantpage.min.js",
+    "minify": "npx --yes -- uglify-es ./instantpage.js --compress --mangle --toplevel --comments \"/^!/\" --output ./instantpage.min.js",
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "repository": {