From 8482e888edd82316ec2f863ba13d2052c27e6ed5 Mon Sep 17 00:00:00 2001 From: hensm Date: Wed, 28 Nov 2018 03:51:00 +0000 Subject: [PATCH] Update README + add web-ext start script --- README.md | 28 +++++++++++++++++++++++++++- ext/package.json | 3 ++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 57eb829..de09c44 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,38 @@ Only tested on Linux and macOS. mDNS library issue to be fixed. `mdns` only work ### Instructions ````sh -git clone https://github.com/hensm/caster.git +git clone https://github.com/hensm/fx_cast.git npm install npm run build npm run install-manifest ```` +This will build the ext and app, outputting to dist/. + +`dist/app/` contains the bridge binary and manifest with the path pointing that binary. `install-manifest` copies the manifest to the proper location (or adds its current location to the registry). + +`dist/ext/` contains the built extension in the format `fx_cast-.zip` in addition to the unpacked extension at `dist/ext/unpacked/`. + + +Watching ext changes and auto reload: +````sh +npm run watch --prefix ./ext + +# In seperate terminal +npm run start --prefix ./ext +```` + + +### Packaging + +Packaging currently only possible on macOS: + +````sh +npm run package +```` + +`dist/app/` contains the installer package: `fx_cast_bridge.pkg` (macOS). `dist/ext/` contains the built extension. + ### Testing Testing requires geckodriver (or chromedriver for Chrome parity testing). See [selenium-webdriver](https://www.npmjs.com/package/selenium-webdriver#installation) installation instructions (ignore `npm install`). diff --git a/ext/package.json b/ext/package.json index cb1705d..7af3fd4 100644 --- a/ext/package.json +++ b/ext/package.json @@ -2,7 +2,8 @@ "scripts": { "build": "node build.js", "package": "node build.js --package", - "watch": "node build.js --watch" + "watch": "node build.js --watch", + "start": "web-ext run -s ../dist/ext/unpacked/" }, "devDependencies": { "@babel/core": "^7.1.5",