From 5f1fa60b384a75fb58efe9fd4d8f046b99b02d35 Mon Sep 17 00:00:00 2001 From: Moshe Brevda Date: Mon, 19 Dec 2022 09:01:56 +0200 Subject: [PATCH] refactor: build scripts before release --- .gitignore | 4 ++++ bin/{uglifyjs => uglifyjs.js} | 0 package.json | 9 ++++----- 3 files changed, 8 insertions(+), 5 deletions(-) rename bin/{uglifyjs => uglifyjs.js} (100%) diff --git a/.gitignore b/.gitignore index 6000c6c3..546c2e69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ /node_modules/ /npm-debug.log tmp/ + +# files generated at build time +bin/uglifyjs +index.js \ No newline at end of file diff --git a/bin/uglifyjs b/bin/uglifyjs.js similarity index 100% rename from bin/uglifyjs rename to bin/uglifyjs.js diff --git a/package.json b/package.json index 5776de16..219abf1a 100644 --- a/package.json +++ b/package.json @@ -12,14 +12,12 @@ "Mihai Bazon (http://lisperator.net/)" ], "repository": "mishoo/UglifyJS", - "main": "tools/node.js", + "main": "index.js", "bin": { "uglifyjs": "bin/uglifyjs" }, "files": [ - "bin", - "lib", - "tools", + "index.js", "LICENSE" ], "devDependencies": { @@ -27,7 +25,8 @@ "semver": "~6.3.0" }, "scripts": { - "test": "node test/compress.js && node test/mocha.js" + "test": "node test/compress.js && node test/mocha.js", + "prepack": "bin/uglifyjs.js --self --mangle --compress --output index.js && bin/uglifyjs.js bin/uglifyjs.js --mangle --compress --output bin/uglifyjs" }, "keywords": [ "cli",