Skip to content

Commit 279f63d

Browse files
committed
write how to build packages
1 parent e640229 commit 279f63d

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

README.md

+37-4
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,46 @@ TBD
1313

1414
Plase read how to build on below.
1515

16-
## How to build
16+
## Build Packages
17+
18+
### Setup
19+
20+
- Install `node` and `yarn`
21+
- `% yarn install`
22+
- `% yarn build`
23+
24+
### Make Packaging
25+
26+
- All packages(for Chrome, Firefox, MSEdge): `% yarn run pack`
27+
- Chrome: `% yarn run pack:chrome`
28+
- Firefox: `% yarn run pack:firefox`
29+
- This command will try to pack for Firefox v52 and if it fails then pack for version less than v52
30+
- Your target version is less than v52: `% yarn run pack:firefox:v50`
31+
- Why Firefox v52? - Firefox v52 has native support for `await-async`
32+
- MS Edge: `% yarn run pack:msedge`
33+
- If you install your MS Edge you should sign appX
34+
35+
### Built Package Location
36+
37+
- Chrome(crx): `packages/scboloo.crx`
38+
- Chrome(zip): `packages/scboloo.chrome.zip`
39+
- Firefox: `packcages/scboloo-X.X.X.zip`
40+
- MSEdge: `packages/edgeExtension.appx`
41+
42+
## Development
1743

1844
- Require `node`, `yarn`
1945

2046
1. `% git clone [email protected]:pastak/scboloo.git`
2147
2. `% cd scboloo`
2248
3. `% yarn install`
23-
4. `% yarn build`
24-
- You can `yarn watch` to watch your code to build while developing.
25-
5. Install `__WORK_DIR__/dist` on `chrome://extensions`
49+
4. Run build command
50+
- Chrome, Firefox(> v52): `% yarn run build`
51+
- dir: `dist/chrome`, `dist/firefox`
52+
- watch: `% yarn run watch`
53+
- Firefox (< v52): `% yarn run build:firefox:v50`
54+
- dir: `dist/firefox-v50`
55+
- watch: `% yarn run build:firefox:v50 -- --watch`
56+
- MSEdge: `% yarn run build:msedge`
57+
- dir: `dist/msedge`
58+
- watch: `yarn run build:msedge -- --watch`

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"pack:chrome:keygen": "if [ ! -f tmp/key.pem ] ; then ./node_modules/.bin/crx keygen ./tmp ; fi",
2323
"pack:firefox": "yarn test:lint:package:firefox:v52 && ./node_modules/.bin/web-ext build -s dist/firefox -a packages || yarn pack:firefox:v50",
2424
"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",
25-
"pack:msedge": "yarn run pack:msedge:prepare && ./node_modules/.bin/manifoldjs -l debug -p edgeextension package tmp/Scboloo/edgeextension/manifest && yarn pack:msedge:finalize",
25+
"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",
2626
"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",
2727
"pack:msedge:replace-manifest": "sed -i -e 's/INSERT-YOUR-PACKAGE-PROPERTIES-PUBLISHERDISPLAYNAME-HERE/Pasta-K/' tmp/Scboloo/edgeextension/manifest/appxmanifest.xml",
2828
"pack:msedge:prepare": "yarn pack:msedge:gen-manifest && yarn pack:msedge:replace-manifest",

0 commit comments

Comments
 (0)