https://github.com/idiocc/hot-reload
Dummy Code For Hot-Reload Compilation.
https://github.com/idiocc/hot-reload
frontend hot-reload idio web
Last synced: 8 months ago
JSON representation
Dummy Code For Hot-Reload Compilation.
- Host: GitHub
- URL: https://github.com/idiocc/hot-reload
- Owner: idiocc
- License: agpl-3.0
- Created: 2020-03-12T06:57:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-12T07:18:20.000Z (over 6 years ago)
- Last Synced: 2025-03-15T09:34:08.326Z (over 1 year ago)
- Topics: frontend, hot-reload, idio, web
- Language: JavaScript
- Homepage: https://www.idio.cc
- Size: 60.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @idio/hot-reload
[](https://www.npmjs.com/package/@idio/hot-reload)
`@idio/hot-reload` is Dummy Code For Hot-Reload Compilation.
```sh
yarn add @idio/hot-reload
```
## Table Of Contents
- [Table Of Contents](#table-of-contents)
- [API](#api)
- [`hotReload(callback): void`](#hotreloadcallback-function-void)
- [Copyright & License](#copyright--license)
## API
The package is available by importing its default function:
```js
import hotReload from '@idio/hot-reload'
```
## hotReload(
`callback: function(),`
): void
The re-rendering function to execute after an update to
any of the files is made.
- callback* `function()`: The callback.
```js
/*
* This file should only be used for compilation with Depack. The
* `@idio/frontend` middleware is supposed to override `@idio/hot-reload`
* import into `/hot-reload` path automatically, without the need for
* the code from this package.
*/
/**
* Registers hot-reload callback to rerender apps.
* @param {!Function} cb
*/
export default function addHotReload(cb) {}
```
This package is meant to be installed when building bundles that use hot-reload from [`@idio/front-end`](https://github.com/idiocc/frontend) middleware. The middleware will serve its proper version of source code needed for hot-reload, but `@idio/hot-reload` is needed when it comes to compiling apps.
## Copyright & License
GNU Affero General Public License v3.0
© Idio 2020