1.5.0 • Published 7 months ago

@sanjo/auto-reload v1.5.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
7 months ago

Auto reload

This work is devoted to God.

Reloads the page when a file in the current working directory has changed.

How to use

Installation

npm install --save-dev @sanjo/auto-reload

Running the file watch server

The file watch server will watch all files in the current working directory.

npx auto-reload

You can optionally pass a port as first argument. By default the server will listen on port 8080.

Including the reload script on the page(s)

Put this script before the closing body tag.

<script src="node_modules/@sanjo/auto-reload/reload.js"></script>

For other ports than 8080, you need to specify the port via:

<script>
  window.AUTO_RELOAD_PORT = 8081
</script>

before the reload.js script inclusion. E.g.

<script>
  window.AUTO_RELOAD_PORT = 8081
</script>
<script src="node_modules/@sanjo/auto-reload/reload.js"></script>
1.5.0

7 months ago

1.4.0

7 months ago

1.3.1

7 months ago

1.3.0

7 months ago

1.2.1

7 months ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago