# doodle

> Doodle: watch JS files and reload pages via websocket

Latest version **0.1.10** (published 2013-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install doodle
pnpm add doodle
yarn add doodle
bun add doodle
```

Provides the command `doodle`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.10 |
| Published | 2013-12-09 |
| First published | 2012-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | jiyinyiyong |
| Maintainers | jiyinyiyong |
| Keywords | reload |

## Links

- npm: https://www.npmjs.com/package/doodle
- Repository: git@github.com:jiyinyiyong/doodle
- Issues: https://github.com/jiyinyiyong/doodle/issues
- npm.io page: https://npm.io/package/doodle

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) *
- [chokidar](https://npm.io/package/chokidar.md) ~0.6.2

## Recent versions

- 0.1.10 (latest) — 2013-12-09
- 0.1.9 — 2013-12-04
- 0.1.8 — 2013-07-15
- 0.1.6 — 2013-05-04
- 0.1.3 — 2013-04-21
- 0.1.2 — 2013-04-21
- 0.1.1 — 2013-04-21
- 0.1.0 — 2013-04-21
- 0.0.11 — 2012-11-30
- 0.0.10 — 2012-11-16
- 0.0.9 — 2012-10-19
- 0.0.8 — 2012-10-19
- 0.0.7 — 2012-10-19
- 0.0.6 — 2012-08-24
- 0.0.5 — 2012-08-24
- … 4 more at https://npm.io/package/doodle/versions

## README

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:

* `log`, print log or not:

```
doodle dir log:true
doodle dir log:yes
doodle dir log:on
doodle log:on dir
```

* `port`, the port serves `doodle.js` on http,  
by default, it's `7777`:  

```
doodle dir port:7777
```

* `ws`, the port websocket listens at,  
by default, it is `options.http - 1`:

```
doodle dir port:7776
```

* `delay`, the time between hear file change and trigger a callback,  
by default, it's `100`

```
doodle dir delay:200
```

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

* `http`, enable HTTP server for client-side listening script
by default, it's `false`

* `ext`, specifies the filename extensions you want to listen

```
doodle dir ext:js,css
```

#### Client script

* doodle-crx

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

[doodle-crx](https://github.com/jiyinyiyong/doodle-crx) is recommanded if you are using chrome.

* add script by hand

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`:

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

* copy the code

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

### License:  

MIT

---
_Source: https://npm.io/package/doodle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
