feat: add firefox support #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a small manifest generation utility and the accompanying documentation and package.json scripts,
to add firefox compatibility #2
scripts/generate-manifest.js
which copiesicons/
andsrc/
intodist/<browser>/
and prepares browser bundles.manifest:chrome
,manifest:firefox
,manifest:all
..gitignore
to exclude generateddist/
,.env
, and.DS_Store
.README.md
with usage instructions for generating browser bundles.Files changed (summary)
scripts/generate-manifest.js
— a simple Node script to copy icons andsrc/
intodist/<browser>/
and produce browser-specific manifests..gitignore
— ignore.env
,dist/
, and macOS.DS_Store
.README.md
— added instructions for using the new manifest generation scripts.package.json
— added npm scripts:manifest:chrome
,manifest:firefox
, andmanifest:all
.Detailed per-file notes
dist/
by copyingicons/
andsrc/
and generating the appropriate manifest structure.scripts/generate-manifest.js
node scripts/generate-manifest.js chrome
should createdist/chrome/
with expected files..env
dist/
.DS_Store
Rationale:
dist/
is generated output from the manifest generator;.env
and.DS_Store
are common local/OS files we don't want in version control.Added a short section titled "Building browser bundles (manifests)" that documents how to run the generator via npm scripts:
npm run manifest:chrome
npm run manifest:firefox
npm run manifest:all
Rationale: Makes it easier for contributors to create browser-specific artifacts.
manifest:chrome
->node scripts/generate-manifest.js chrome
manifest:firefox
->node scripts/generate-manifest.js firefox
manifest:all
->node scripts/generate-manifest.js
Rationale: provide convenient shortcuts for running the generator.
How to test locally
Verify
dist/chrome/
containsicons/
,src/
, and a manifest suitable for Chrome.Generate Firefox bundle:
dist/<browser>/
directory as an unpacked extension in your browser for a quick smoke test.Closes #2