Skip to content

Commit

Permalink
write how to build packages
Browse files Browse the repository at this point in the history
  • Loading branch information
pastak committed Jan 26, 2017
1 parent e640229 commit 279f63d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 5 deletions.
41 changes: 37 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 279f63d

Please sign in to comment.