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

https://github.com/xvezda/hotcake

:pancakes: Bring simple auto refresh (or live reload) to your web project right away
https://github.com/xvezda/hotcake

auto-refresh javascript live-reload web-development-utility

Last synced: about 2 months ago
JSON representation

:pancakes: Bring simple auto refresh (or live reload) to your web project right away

Awesome Lists containing this project

README

        

# hotcake

[![Version](https://img.shields.io/npm/v/hotcake)](https://npm.im/hotcake)
[![License](https://img.shields.io/npm/l/hotcake)](https://npm.im/hotcake)
[![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/standard/semistandard)

Bring HMR-like auto refresh functionality without any server (e.g. `websocket`, `socket.io`, etc.) and keep it minimal, simple.

![Demo](https://gist.githubusercontent.com/Xvezda/926edfc7b961c31a17751a8c9f4351b6/raw/hotcake.gif)

## Installation

Add following tag to your html file.

```html

```

Or Via GitHub. (Not recommended)

```html

```

Or even with npm... (Also not recommended)

```sh
npm install --save-dev hotcake
```

## Usage

After installation, you can explicitly initialize hotcake with options.

```html

new Hotcake({
observe: ['./', './app.js'],
interval: 5000
});

```

If hotcake not initialized explicitly, it will automatically initialize with default options when window loaded.

## Options

| name | type | description | default |
| -------- | ---------- | ----------------------------------------------- | ------- |
| observe | `string[]` | Path of files to observe. | `['./']` |
| interval | `number` | Millisecond value of interval between requests. | `3000` |

## License

Copyright (C) 2020 Xvezda

[MIT License](LICENSE)