diff --git a/README.md b/README.md index 410d002..9d7fda7 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,46 @@ TBD Plase read how to build on below. -## How to build +## Build Packages + +### Setup + +- Install `node` and `yarn` +- `% yarn install` +- `% yarn build` + +### Make Packaging + +- All packages(for Chrome, Firefox, MSEdge): `% yarn run pack` +- Chrome: `% yarn run pack:chrome` +- Firefox: `% yarn run pack:firefox` + - This command will try to pack for Firefox v52 and if it fails then pack for version less than v52 + - Your target version is less than v52: `% yarn run pack:firefox:v50` + - Why Firefox v52? - Firefox v52 has native support for `await-async` +- MS Edge: `% yarn run pack:msedge` + - If you install your MS Edge you should sign appX + +### Built Package Location + +- Chrome(crx): `packages/scboloo.crx` +- Chrome(zip): `packages/scboloo.chrome.zip` +- Firefox: `packcages/scboloo-X.X.X.zip` +- MSEdge: `packages/edgeExtension.appx` + +## Development - Require `node`, `yarn` 1. `% git clone git@github.com:pastak/scboloo.git` 2. `% cd scboloo` 3. `% yarn install` -4. `% yarn build` - - You can `yarn watch` to watch your code to build while developing. -5. Install `__WORK_DIR__/dist` on `chrome://extensions` +4. Run build command + - Chrome, Firefox(> v52): `% yarn run build` + - dir: `dist/chrome`, `dist/firefox` + - watch: `% yarn run watch` + - Firefox (< v52): `% yarn run build:firefox:v50` + - dir: `dist/firefox-v50` + - watch: `% yarn run build:firefox:v50 -- --watch` + - MSEdge: `% yarn run build:msedge` + - dir: `dist/msedge` + - watch: `yarn run build:msedge -- --watch` diff --git a/package.json b/package.json index 8388512..f3c88cc 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "pack:chrome:keygen": "if [ ! -f tmp/key.pem ] ; then ./node_modules/.bin/crx keygen ./tmp ; fi", "pack:firefox": "yarn test:lint:package:firefox:v52 && ./node_modules/.bin/web-ext build -s dist/firefox -a packages || yarn pack:firefox:v50", "pack:firefox:v50": "yarn build:firefox:v50 && yarn run test:lint:package:firefox:v50 && ./node_modules/.bin/web-ext build -s dist/firefox-v50 -a packages", - "pack:msedge": "yarn run pack:msedge:prepare && ./node_modules/.bin/manifoldjs -l debug -p edgeextension package tmp/Scboloo/edgeextension/manifest && yarn pack:msedge:finalize", + "pack:msedge": "yarn run build:msedge && yarn run pack:msedge:prepare && ./node_modules/.bin/manifoldjs -l debug -p edgeextension package tmp/Scboloo/edgeextension/manifest && yarn pack:msedge:finalize", "pack:msedge:gen-manifest": "rm -rf tmp/Scboloo && ./node_modules/.bin/manifoldjs -l debug -p edgeextension -f edgeextension -m dist/msedge/manifest.json && mv Scboloo tmp", "pack:msedge:replace-manifest": "sed -i -e 's/INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE/Pasta-K/' tmp/Scboloo/edgeextension/manifest/appxmanifest.xml", "pack:msedge:prepare": "yarn pack:msedge:gen-manifest && yarn pack:msedge:replace-manifest",