Skip to content

Commit bd66c18

Browse files
committed
simplified deployment
1 parent 9880be9 commit bd66c18

File tree

5 files changed

+262
-10
lines changed

5 files changed

+262
-10
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ webext/content-script.js.map
77
webext/background.js
88
webext/background.js.map
99
webext/ssb-client.js
10-
web-ext-artifacts/
10+
web-ext-artifacts/

Diff for: README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ are running Patchwork). You need to install native messaging host by running
3232

3333
To run the example you need to have the extension intalled and access the example page.
3434

35-
npm run-script start:ext
35+
npm run-script run
3636

37-
This should start a browser with the extension. Alternatively you can also load the extension from the `webext` folder as temporary extension in your browser. Access the file `page.html` in the `site` folder.
37+
This should start a browser with the extension. Alternatively you can also load the extension from the `webext` folder as temporary extension in your browser. It also start a web--server serving the `site` on port 9090.
3838

39-
npm run-script serve
40-
41-
Now you can access http://localhost:9090/page.html
39+
Now you can access http://localhost:9090/
4240

4341

Diff for: package-lock.json

+249
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
"name": "scuttle-shell-browser",
33
"version": "1.0.0",
44
"description": "Web Extension that allows webpages to access Secure Scuttlebutt",
5+
"bin": "./setup/native-host.js",
56
"scripts": {
67
"build": "rollup -c",
7-
"start:ext": "web-ext run --no-reload --bc -v -u \"http://localhost:9090/product-review.html\" -u \"about:debugging#/runtime/this-firefox\" --source-dir ./webext/",
8-
"webext:build":"web-ext build",
8+
"run:browser": "web-ext run --no-reload --bc -v -u \"http://localhost:9090/product-review.html\" -u \"about:debugging#/runtime/this-firefox\" --source-dir ./webext/",
9+
"run:server": "http-server site -p 9090",
10+
"run": "run-p run:*",
11+
"webext:build": "web-ext build",
912
"webext:sign": "web-ext sign --api-key=$AMO_JWT_ISSUER --api-secret=$AMO_JWT_SECRET",
10-
"serve": "http-server site -p 9090",
1113
"setup:native-host": "node setup/native-host.js"
1214
},
1315
"webExt": {
@@ -29,6 +31,7 @@
2931
"@rollup/plugin-node-resolve": "^11.0.0",
3032
"browserify": "^17.0.0",
3133
"http-server": "^0.12.3",
34+
"npm-run-all": "^4.1.5",
3235
"rollup": "^2.34.1",
3336
"rollup-plugin-css-only": "^3.0.0",
3437
"rollup-plugin-livereload": "^2.0.0",

Diff for: setup/native-host.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import {Setup} from "web-ext-native-msg"
22

33
const handlerAfterSetup = info => {
44
const {configDirPath, shellScriptPath, manifestPath} = info;
5-
// do something
5+
console.log('-----')
6+
console.log('The Scuttle Shell Browser host has been installed.')
7+
console.log('Install the Scuttle Shell Browser Firefox Add-on if you haven\'t already.')
68
};
79

810
const setup = new Setup({

0 commit comments

Comments
 (0)