Home

Awesome

Doodle: watch JS files and reload pages via websocket

Command-line tool for making static web pages, reload page on save.
The page gets the message and then reload automatically.
Connecting and reloading from a another computor is ok.

Usage:

You can install doodle from npm by:

sudo npm install -g doodle

Then run this command in your terminal to start waching,
both files and directories are fine:

doodle path1 path2 path3 dir1 dir2 dir3

There are some options you may config,
options are in the syntax of key:value, order is not required:

doodle dir log:true
doodle dir log:yes
doodle dir log:on
doodle log:on dir
doodle dir port:7777
doodle dir port:7776
doodle dir delay:200

type doodle help: or doodle -h or doodle --help for the list.

Client script

doodle will open a ws:// server at port options.ws,

doodle-crx is recommanded if you are using chrome.

You can add a <script> tag to you html file to reload,
using a command option http:yes to put doodle.js file at options.port.
the port corresponds to options.port:

script(src='http://localhost:7777/doodle.js')

coffee/doodle.coffee shows a demo for listening the ws events and reload, put it in you HTML and it would work.

License:

MIT