https://github.com/jamsinclair/web-ext-reload
Reload your chrome extension during development
https://github.com/jamsinclair/web-ext-reload
Last synced: 22 days ago
JSON representation
Reload your chrome extension during development
- Host: GitHub
- URL: https://github.com/jamsinclair/web-ext-reload
- Owner: jamsinclair
- License: mit
- Created: 2019-03-10T23:26:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-14T15:09:03.000Z (about 6 years ago)
- Last Synced: 2025-03-10T07:36:49.344Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# web-ext-reload
>
Reload your Chrome extension during development via websockets.
## Install
```
$ npm install web-ext-reload
```You'll also need to copy the `chrome-background-reload.js` to your chrome extension
as a persistent background script.```json
{
"background": {
"scripts": [ "chrome-background-reload.js"],
"persistent": true
}
}
```## CLI
```
$ web-ext-reload --helpUsage
$ web-ext-reload path/to/watchOptions
--ignoredPaths, -i File/Glob of paths to ignore (Default: node_modules)
--port, -p Port number to start the reload server on (Default: 3030)Examples
$ web-ext-reload ./
$ web-ext-reload ./dist -p 9000 -i ./dist/config
```## Usage
```js
const webExtReload = require('web-ext-reload');webExtReload.startServer({ paths: './dist' });
```## API
### startServer(options)
Returns instance of the Server
#### options
Type: `Object`
##### ignoredPaths
Type: `string|array`
Default: `'node_modules/**'`Filepath or glob of files to ignore
##### paths
Type: `string|Array`
Default: `'./'`Filepath or glob of files to watch
##### port
Type: `number`
Default: `3030`Port number to start the reload server on
##### watch
Type: `boolean`
Default: `true`Whether to start watching files on server start
### Server
#### .start()
#### .startWatcher(paths, ignored)
#### .stopWatcher()
#### .stopServer()
#### .stop()
#### .sendReloadEvent()
## License
MIT © [jamsinclair](https://github.com/jamsinclair)