Update build process to differ between Firefox and Chrome
This commit is contained in:
parent
1cacf903dc
commit
cae5d95be0
12
README.md
12
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.
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
buildInputs = [
|
||||
pkgs.nodejs_22
|
||||
pkgs.firefox
|
||||
pkgs.chromium
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue