Skip to content
No description or website provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
demo
lib
.gitignore
.npmignore
README.md
package.json
snap.js

README.md

Snap

Snap is a auto browser reloader designed to be used for web design and javascript testing. It is capable of monitoring file system changes and reloading a web page when a change is detected. It is like livereload but free and works on windows.

Snap is an example of readme driven development.

Usage

To use, start the server:

$ node [path to snap.js] [path to directory to watch for chanes] [optional quoted regular expression of files to watch]

and add the following script reference to the end of your web page, immediately before </body>

<script type="text/javascript" src="http://localhost:1337/script"></script>

Demo

Look at README.md in demo/ for examples of how to monitor all file changes or changes to files of a specific type.

How does it work

The script loaded in the page polls the server process every five seconds. If a relevant file system change has occurred it reloads the page.

Something went wrong with that request. Please try again.