diff --git a/README.md b/README.md index 82b3ae2..0997f84 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,11 @@ MetamorPOV includes Node packages for verb conjugation. You'll need [Node](https # Install project dependencies npm install -# Generate a .zip that can be loaded in a browser +# Generate a .zip that can be loaded in Firefox npm run build + +# Generate a .zip that can be loaded in Chromium-based browsers +npm run build-chrome ``` ### Testing @@ -35,6 +38,13 @@ npm run test npx rollup -c ``` +To test for Chrome, you will need to have Chromium installed. + +```sh +# Open a browser instance, you will need to go to chrome://extensions and open the source folder manually +npm run test-chrome +``` + ## Copyright and License - Portions of MetamorPOV are derived from [InteractiveFics](https://github.com/interactivefics/interactive-fics), licensed under [MIT](third-party-licenses/LICENSE-InteractiveFics), copyrighted 2015-2023 by Mariam Maarouf. diff --git a/flake.nix b/flake.nix index 2dd18e9..c27db51 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ buildInputs = [ pkgs.nodejs_22 pkgs.firefox + pkgs.chromium ]; }; }); diff --git a/package.json b/package.json index 306c6ae..0aaa77b 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,10 @@ "author": "Jean Viscogliosi-Pate", "license": "GPL-3.0-or-later", "scripts": { - "test": "npx rollup -c && npx web-ext run -s src", - "build": "npx rollup -c && npx web-ext build -s src -a dist --ignore-files replace-words.js save-load-options.js icons/metamorpov.svg icons/svg-to-png.sh -o" + "test": "cp src/manifest-firefox.json src/manifest.json && npx rollup -c && npx web-ext run -s src && rm src/manifest.json", + "test-chrome": "cp src/manifest-chrome.json src/manifest.json && npx rollup -c && chromium && rm src/manifest.json", + "build": "cp src/manifest-firefox.json src/manifest.json && npx rollup -c && npx web-ext build -s src -a dist --ignore-files replace-words.js save-load-options.js manifest-* service-worker* -n {name}-{version}-firefox.zip -o && rm src/manifest.json", + "build-chrome": "cp src/manifest-chrome.json src/manifest.json && npx rollup -c && npx web-ext build -s src -a dist --ignore-files replace-words.js save-load-options.js manifest-* background.js -n {name}-{version}-chrome.zip -o && rm src/manifest.json" }, "devDependencies": { "@rollup/plugin-commonjs": "28.0.2",