diff --git a/package.json b/package.json index cdd203a..a9c1e54 100644 --- a/package.json +++ b/package.json @@ -5,17 +5,11 @@ "main": "src/index.js", "scripts": { "create-dirs": "mkdir -p firefox/data chrome/data build/injections build/lib", - "build-extensions": "npm run build-firefox && npm run build-chrome", - "build-firefox": "cd firefox/ && jpm xpi && cd -", - "build-chrome": "crx pack chrome -o chrome/hipchat-emoticons-for-all.crx", - "release-chrome": "crx pack chrome -o chrome/hipchat-emoticons-for-all.crx -p chrome/key.pem", - "test-firefox": "cd firefox/ && jpm run -b /usr/bin/firefox && cd -", - "test": "npm run develop && npm run test-firefox", - "build-js": "bash build-js.sh", - "develop": "npm run lint && npm run build-js && npm run distribute", + "test-extension": "bash scripts/test-extension.sh", + "build-js": "bash scripts/build-js.sh", + "develop": "npm run lint && npm run build-js && bash scripts/distribute.sh", "build-assets": "env/bin/python3 assets/build-assets.py", - "build-data-files": "env/bin/python3 firefox/build-package.py && env/bin/python3 chrome/build-manifest.py", - "distribute": "rm -rf firefox/data/* chrome/data/* && cp -rf build/* firefox/data/ && cp -rf build/* chrome/data/", + "build-data-files": "bash scripts/data-files.sh", "build": "npm run create-dirs && npm run build-assets && npm run develop && npm run build-data-files", "lint":"eslint -c node_modules/eslint-config/.eslintrc 'src/injections/' 'src/global.js'", "clean": "rm -rf firefox/data chrome/data node_modules/ build/ env/" diff --git a/build-js.sh b/scripts/build-js.sh similarity index 100% rename from build-js.sh rename to scripts/build-js.sh diff --git a/scripts/data-files.sh b/scripts/data-files.sh new file mode 100644 index 0000000..90fa583 --- /dev/null +++ b/scripts/data-files.sh @@ -0,0 +1,9 @@ +#!usr/bin/bash + +set -e + +echo "Building Firefox Package..." +env/bin/python3 firefox/build-package.py + +echo "Building Chrome Manifest..." +env/bin/python3 chrome/build-manifest.py \ No newline at end of file diff --git a/scripts/distribute.sh b/scripts/distribute.sh new file mode 100644 index 0000000..c73d7e5 --- /dev/null +++ b/scripts/distribute.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +set -e + +echo "Distributing Files..." +rm -rf firefox/data/* chrome/data/* +cp -rf build/* firefox/data/ +cp -rf build/* chrome/data/ \ No newline at end of file diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100644 index 0000000..3daf467 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,11 @@ +#!/usr/bin/bash + +set -e + +echo "Building Firefox Extension..." +cd firefox/ +jpm xpi --check-memory --profile-memory +cd - + +echo "Building Chrome Extension..." +crx pack chrome -o 'chrome/hipchat-emoticons-for-all.crx' -p 'chrome/key.pem' \ No newline at end of file