Moved long commands out of package.json
This commit is contained in:
parent
049c1879c4
commit
66375a134b
5 changed files with 32 additions and 10 deletions
14
package.json
14
package.json
|
@ -5,17 +5,11 @@
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"create-dirs": "mkdir -p firefox/data chrome/data build/injections build/lib",
|
"create-dirs": "mkdir -p firefox/data chrome/data build/injections build/lib",
|
||||||
"build-extensions": "npm run build-firefox && npm run build-chrome",
|
"test-extension": "bash scripts/test-extension.sh",
|
||||||
"build-firefox": "cd firefox/ && jpm xpi && cd -",
|
"build-js": "bash scripts/build-js.sh",
|
||||||
"build-chrome": "crx pack chrome -o chrome/hipchat-emoticons-for-all.crx",
|
"develop": "npm run lint && npm run build-js && bash scripts/distribute.sh",
|
||||||
"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",
|
|
||||||
"build-assets": "env/bin/python3 assets/build-assets.py",
|
"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",
|
"build-data-files": "bash scripts/data-files.sh",
|
||||||
"distribute": "rm -rf firefox/data/* chrome/data/* && cp -rf build/* firefox/data/ && cp -rf build/* chrome/data/",
|
|
||||||
"build": "npm run create-dirs && npm run build-assets && npm run develop && npm run build-data-files",
|
"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'",
|
"lint":"eslint -c node_modules/eslint-config/.eslintrc 'src/injections/' 'src/global.js'",
|
||||||
"clean": "rm -rf firefox/data chrome/data node_modules/ build/ env/"
|
"clean": "rm -rf firefox/data chrome/data node_modules/ build/ env/"
|
||||||
|
|
9
scripts/data-files.sh
Normal file
9
scripts/data-files.sh
Normal 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
8
scripts/distribute.sh
Normal 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
11
scripts/release.sh
Normal 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'
|
Reference in a new issue