https://github.com/denyncrawford/deno-rollup-plugin-livereload
Rollup automatically reloads your browser when the filesystem changes.
https://github.com/denyncrawford/deno-rollup-plugin-livereload
Last synced: over 1 year ago
JSON representation
Rollup automatically reloads your browser when the filesystem changes.
- Host: GitHub
- URL: https://github.com/denyncrawford/deno-rollup-plugin-livereload
- Owner: denyncrawford
- License: mit
- Created: 2021-04-14T22:00:41.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-14T22:07:39.000Z (over 5 years ago)
- Last Synced: 2025-02-05T11:38:18.594Z (over 1 year ago)
- Language: TypeScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Rollup plugin LiveReload
## Overview
This modules made for [deno-rollup](https://github.com/cmorten/deno-rollup) **Next-generation ES module bundler for Deno ported from Rollup**.
deno-rollup-plugin-livereload is a Deno rebuilt/port from rollup-plugin-livereload. Automatically reload your browser when the filesystem changes.
## Import
```typescript
import livereload from 'https://deno.land/x/drollup_plugin_livereload@0.1.0/mod.ts'
```
## Usage
```js
// rollup.config.js
export default {
entry: 'entry.js',
dest: 'bundle.js',
plugins: [livereload()],
}
```
To make it a real dev-server, combine this plugin with [deno-rollup-plugin-serve].
```js
// rollup.config.js
import serve from 'https://deno.land/x/drollup_plugin_serve/mod.ts'
import livereload from 'https://deno.land/x/drollup_plugin_livereload/mod.ts'
export default {
entry: 'entry.js',
dest: 'bundle.js',
plugins: [
serve(), // index.html should be in root of project
livereload(),
],
}
```
### Options
By default, it watches the current directory. If you also have css output, pass the folder to which the build files are written.
```typescript
livereload('dist')
// --- OR ---
livereload({
base: ['dist'],
verbose: false, // Disable console output
// other livereload options
exclude: ['*.ts']
})
```
Options are always passed to [`new LiveReload()`][deno-livereload]
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Contributions and feedback are very welcome.
## Credits
- [Thomas Ghysels](https://github.com/thgh)
- [Miguel Rangel](https://github.com/denyncrawford)
- [All Contributors][link-contributors]
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.
[link-author]: https://github.com/thgh
[link-contributors]: ../../contributors
[deno-livereload]: https://deno.land/x/livereload
[deno-rollup-plugin-serve]: https://deno.land/x/drollup_plugin_serve