Adding package script, updating gitignore

This commit is contained in:
Jean Viscogliosi-Pate 2025-01-26 21:30:01 -08:00
parent 2754ffafe6
commit 0f03f93010
3 changed files with 7 additions and 6 deletions

5
.gitignore vendored
View File

@ -1,6 +1,3 @@
*-update/*
*.DS_Store
node_modules
src/content-script.js
src/.amo-upload-uuid
src/web-ext-artifacts
*web-ext-artifacts/*

View File

@ -10,11 +10,14 @@ MetamorPOV includes Node packages for verb conjugation. You'll need [Node](https
# Install project dependencies
npm install
# Bundles replace-words.js and its dependencies into content-script.js
# Bundle replace-words.js and its dependencies into content-script.js
npm run build
# Open a browser instance with the extension installed
npm run test
# Generate a .zip that can be loaded in a browser
npm run package
```
When running the extension with the `test` script, it will be updated automatically as source files are modified. This excludes `content-script.js`, which has to be bundled manually by running the `build` script.

View File

@ -12,7 +12,8 @@
"license": "GPL-3.0-or-later",
"scripts": {
"build": "npx rollup -c",
"test": "npx web-ext run -s src"
"test": "npx web-ext run -s src",
"package": "npx web-ext build -s src"
},
"devDependencies": {
"@rollup/plugin-commonjs": "28.0.2",