Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 14 days ago
JSON representation

Dummy Code For Hot-Reload Compilation.

Awesome Lists containing this project

README

        

# @idio/hot-reload

[![npm version](https://badge.fury.io/js/%40idio%2Fhot-reload.svg)](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


idiocc
© Idio 2020