From e1d030db0e25cee0f82430540a12a28055f3c103 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 20 Aug 2015 14:22:56 +0100 Subject: [PATCH] Moved hacky script out to seperate file --- build-js.sh | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 build-js.sh diff --git a/build-js.sh b/build-js.sh new file mode 100644 index 0000000..149cb56 --- /dev/null +++ b/build-js.sh @@ -0,0 +1,7 @@ +#~!/usr/bin/bash + +cp -r src/* build/ +rm -rf build/injections/* +mkdir -p build/src/injections +for f in src/injections/*; do uglifyjs $f --compress --mangle -o build/$f; done +cp build/src/injections/* build/injections/ && rm -rf build/src \ No newline at end of file diff --git a/package.json b/package.json index 869f942..cb2f907 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build-extensions": "npm run build-firefox && npm run build-chrome", "build-firefox": "cd firefox/ && jpm xpi && cd -", "build-chrome": "crx pack chrome -o hipchat-emoticons-for-all.crx -p chrome/key.pem", - "build-js": "cp -r src/* build/ && rm -rf build/injections && mkdir -p build/src/injections && for f in src/injections/*; do uglifyjs $f --compress --mangle -o build/$f; done && cp build/src/injections/* build/injections/ && rm -rf build/src", + "build-js": "bash build-js.sh", "build-data-files": "python firefox/build-package.py && python chrome/build-manifest.py", "distribute": "cp build/* firefox/data/ && cp build/* chrome/data/", "build": "npm run clean && npm run create-dirs && npm install && npm run build-js && npm run distribute && npm run build-data-files && npm run build-extensions",