# web-ext-reload

> Plugin to reload your web extension during development

Latest version **0.3.0** (published 2019-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install web-ext-reload
pnpm add web-ext-reload
yarn add web-ext-reload
bun add web-ext-reload
```

Provides the command `web-ext-reload`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2019-03-14 |
| First published | 2019-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.6.0 |
| Dependencies | 4 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | jamsinclair |
| Maintainers | jamsinclair |
| Keywords | chrome, browser, extension, reload, devtool |

## Links

- npm: https://www.npmjs.com/package/web-ext-reload
- Repository: https://github.com/jamsinclair/web-ext-reload
- npm.io page: https://npm.io/package/web-ext-reload

## Dependencies (4)

- [ws](https://npm.io/package/ws.md) ^6.2.0
- [meow](https://npm.io/package/meow.md) ^5.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [chokidar](https://npm.io/package/chokidar.md) ^2.1.2

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2019-03-14
- 0.2.0 — 2019-03-11
- 0.1.0 — 2019-03-10

## 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 --help

  Usage
    $ web-ext-reload path/to/watch

  Options
    --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`<br>
Default: `'node_modules/**'`

Filepath or glob of files to ignore

##### paths

Type: `string|Array`<br>
Default: `'./'`

Filepath or glob of files to watch

##### port

Type: `number`<br>
Default: `3030`

Port number to start the reload server on

##### watch

Type: `boolean`<br>
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)

---
_Source: https://npm.io/package/web-ext-reload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
