Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevincharm/parcel-plugin-web-extension
📦🚀 Parcel plugin for WebExtension projects
https://github.com/kevincharm/parcel-plugin-web-extension
Last synced: 5 days ago
JSON representation
📦🚀 Parcel plugin for WebExtension projects
- Host: GitHub
- URL: https://github.com/kevincharm/parcel-plugin-web-extension
- Owner: kevincharm
- License: apache-2.0
- Created: 2018-06-10T04:08:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:22:26.000Z (about 2 years ago)
- Last Synced: 2025-01-22T14:07:31.452Z (13 days ago)
- Language: JavaScript
- Homepage:
- Size: 775 KB
- Stars: 112
- Watchers: 6
- Forks: 16
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-parcel - web-extension - Plugin that enables to use a WebExtension `manifest.json` as an entry point. (Plugins / Other)
README
[![Build Status](https://travis-ci.org/kevincharm/parcel-plugin-web-extension.svg?branch=master)](https://travis-ci.org/kevincharm/parcel-plugin-web-extension)
# parcel-plugin-web-extension
This [parcel](https://github.com/parcel-bundler/parcel) plugin enables you to use a WebExtension `manifest.json` as an entry point. For more information about `manifest.json`, please refer to the [MDN docs](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json).
## Installation
Install via npm:
```sh
npm install --save-dev parcel-plugin-web-extension
```
or via yarn:
```sh
yarn add -D parcel-plugin-web-extension
```## Usage
### Quick Start
After installing this plugin, use `manifest.json` as your entry point, like so:
```sh
parcel src/manifest.json
```
Your assets will now be resolved from the contents of your manifest file.Assets resolved by this plugin:
- `background.scripts`
- `background.page`
- `content_scripts`
- `browser_action.default_popup`
- `browser_action.default_icon`
- `page_action.default_popup`
- `page_action.default_icon`
- `icons`
- `web_accessible_resources`
- `chrome_url_overrides.bookmarks`
- `chrome_url_overrides.newtab`
- `chrome_url_overrides.history`### Environments
This plugin will try to resolve and merge environment-specific manifest files in the format `manifest.${NODE_ENV}.json`. For example, in development, you can run:
```sh
NODE_ENV=development parcel src/manifest.json
```
and the plugin will also look for `manifest.development.json` and merge those keys into the base manifest.## Licence
Apache 2.0