1.0.0 • Published 4 years ago

hotcake v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

hotcake

License js-semistandard-style

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

Demo

Installation

Add following tag to your html file.

<script src="https://cdn.jsdelivr.net/npm/hotcake"></script>

Usage

After installation, you can explicitly initialize hotcake with options.

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

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

Options

nametypedescriptiondefault
observestring[]Path of files to observe.['./']
intervalnumberMillisecond value of interval between requests.3000

License

Copyright (C) 2020 Xvezda

MIT License