Skip to content
/ hotcake Public

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

License

Notifications You must be signed in to change notification settings

Xvezda/hotcake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hotcake

Version 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>

Or Via GitHub. (Not recommended)

<script src="https://raw.githack.com/Xvezda/hotcake/master/hotcake.js"></script>

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

npm install --save-dev hotcake

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

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published