1
Fork 0

Moved long commands out of package.json

This commit is contained in:
Jake Howard 2015-10-05 15:12:22 +01:00
parent 049c1879c4
commit 66375a134b
5 changed files with 32 additions and 10 deletions

View File

@ -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/"

9
scripts/data-files.sh Normal file
View File

@ -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

8
scripts/distribute.sh Normal file
View File

@ -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/

11
scripts/release.sh Normal file
View File

@ -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'