{
  "name": "simple-autoreload-server",
  "description": "Simple Web Server with live/autoreload features without browser extensions.",
  "version": "0.2.15",
  "homepage": "https://github.com/cytb/simple-autoreload-server",
  "author": {
    "name": "cytb",
    "url": "https://github.com/cytb/"
  },
  "dependencies": {
    "colors": "0.6.2",
    "connect": "3.6.6",
    "faye-websocket": "^0.11.3",
    "gulp": "^4.0.2",
    "minimatch": "3.0.2",
    "morgan": "1.9.1",
    "opener": "1.4.1",
    "serve-index": "1.9.1",
    "serve-static": "1.13.2"
  },
  "devDependencies": {
    "chai": "3.5.0",
    "del": "2.2.0",
    "es6-map": "0.1.4",
    "es6-promise": "4.0.5",
    "gulp-chmod": "1.3.0",
    "gulp-concat": "2.6.0",
    "gulp-if": "2.0.0",
    "gulp-insert": "0.5.0",
    "gulp-livescript": "3.0.0",
    "gulp-mocha": "8.0.0",
    "gulp-rename": "1.2.2",
    "gulp-template": "^5.0.0",
    "gulp-uglify": "1.5.3",
    "harmony-reflect": "1.4.2",
    "livescript": "1.4.0",
    "lodash": "^4.17.21",
    "mocha": "^8.3.0",
    "phantom": "2.1.21",
    "phantomjs-prebuilt": "^2.1.16",
    "prelude-ls": "1.0.3"
  },
  "keywords": [
    "autoreload",
    "websocket",
    "livereload",
    "web",
    "development",
    "app"
  ],
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git://github.com/cytb/simple-autoreload-server"
  },
  "bin": {
    "autoreload-server": "bin/autoreload"
  },
  "main": "index.js",
  "scripts": {
    "prepare": "gulp release-npm && npm prune",
    "prepublish": "gulp release-npm && npm prune",
    "test": "gulp test",
    "version": "gulp npm-version && git add -A",
    "postversion": "git tag -f alpha && git push && git push --delete origin alpha && git push --tags"
  },
  "engines": {
    "node": ">=0.12.0"
  },
  "readme": "simple-autoreload-server [![Build Status](https://travis-ci.org/cytb/simple-autoreload-server.png?branch=main)](https://travis-ci.org/cytb/simple-autoreload-server)\n========================\n\nA simple Web server on Node.js with autoreload/livereload feature.\n  - Reload statically on update the html files\n  - Refresh dynamically on update the files like css, js, png, and etc.\n  - No browser extensions are needed. (uses only WebSocket.)\n  - Broadcast handleable event on client side window.\n\nUsage\n----\n  1. Install simple-autoreload-server via npm.\n\n     (e.g. npm install simple-autoreload-server)\n\n  2. Start autoreload-server from command line.\n\n     (e.g. autoreload-server -d ./ -p 8080)\n\n  3. Open server url with your browser.\n\n     (e.g. iexplore http://localhost:8080/)\n\nInstallation\n--------------\ninstall this package via 'npm'.\n\n```sh\nnpm install -g simple-autoreload-server\n```\n\nCommand Line Usage\n----\n```sh\nautoreload-server [options] [root-dir] [port]\n```\n\n### Example 1\nStart server with options.\n\n```sh\nautoreload-server -w \"**/**.{html,css,js}\" ./site-files 8008\n```\n### Example 2\nStart server with json instead of commandline-options.\n\ncommand\n```sh\nautoreload-server\n```\n\ncontent of .autoreload.json\n```sh\n{\n  \"watch\":  \"**/**.html\",\n  \"reload\": \"**/**.html\",\n  \"mount\": [\n    {\n      \"path\":   \"modules/\",\n      \"target\": \"/\"\n    }\n  ],\n  \"inject\": [\n    {\n      \"content\": \"before-body.html\",\n      \"which\":   \"**/**.html\",\n      \"where\":   \"</body>\",\n      \"prepend\": true\n    }\n  ]\n}\n```\n\n***In case of using another config json file instead of \".autoreload.json\", invoke command with '-c' or '--config' option.***\n***See [Options.md](./Options.md) and [config.json in examples](./examples/markdown-parser/config.json) for details.***\n\n### Example 3\nas module.\n\n```\nvar launcher = require('simple-autoreload-server');\n\nvar server = launcher({\n  port: 8008,\n  path: './',\n  listDirectory: true,\n  watch:  \"*.{png,js,html,json,swf}\"\n  reload: \"{*.json,static.swf}\"\n});\n```\n\n\nCommand Line Options\n----\n\noption | default | help\n:--- | :--- | :---\n`--path, -d` | `.` | _set directory to publish._\n`--watch, -w` | `**/**` | _pattern for file to watch._\n`--reload, -r` | `false` | _pattern for file to reload the whole page._\n`--mount.path, -m` | `.` | _set additional directory to publish._\n`--mount.target, -t` | `/` | _server side path of mounted direcory_\n`--mount.watch, -W` | `**/**` | _pattern of file to watch._\n`--host, -H` | `0.0.0.0` | _set host address to publish._\n`--port, -p` | `8080` | _set port to listen (http)._\n`--config, -c` | `.autoreload.json` | _load options from json._\n`--search-config` | `true` | _search for config json in parent directories._\n`--list-directory, -l` | `true` | _enable directory listing._\n`--browse, -b` | `false` | _open server url by platform default program._\n`--execute, -e` | `` | _execute command when the server has prepared._\n`--stop-on-exit, -k` | `false` | _exit when invoked process specified by \"execute\" died._\n`--ignore-case, -i` | `true` | _ignore case of glob patterns._\n`--include-hidden, -n` | `false` | _glob includes hidden files._\n`--default-pages` | `index.{htm,html}` | _default page file pattern for directory request._\n`--encoding` | `utf-8` | _encoding for reading texts and inject target files_\n`--watch-delay` | `20` | _delay time to supress duplicate watch event (ms)._\n`--log, -v` | `normal` | _set log-level_\n`--builtin-script` | `true` | _enable default built-in script injection._\n`--client-module` | `true` | _expose client module to 'window' object._\n`--client-log` | `false` | _inform client to log._\n`--recursive, -R` | `true` | _watch sub-directories recursively._\n`--follow-symlinks, -L` | `false` | _follow symbolic-links. (requires 'recursive' option)_\n`--inject.content, -I` | `` | _injects specified content._\n`--inject.type, -T` | `file` | _type of \"inject.content\"._\n`--inject.which, -F` | `**/**.{htm,html}` | _specify pattern for injection target._\n`--inject.where, -P` | `</(body|head|html)>` | _specify regex string where to inject._\n`--inject.prepend, -E` | `false` | _insert content before matched._\n`--help, -h` | `false` | _show help_\n`--version, -V` | `false` | _show version_\n\n\nSee [Options.md](./Options.md) for details.\n\nClient Module Usage\n----\n***note: available only for the web page injected the built-in script module.***\n\nClient module will be exposed as window.AutoreloadClient (default).\n\nand the module emits some events. set listener to window object to handle events.\n\ne.g.\n\n  window.addEventListener(\"AutoreloadClient.update\", function(ev){...});\n\n\nCurrently, following events are handleable on client side.\n\nevent   | desc\n:---    |:---\nupdate  | file update detected\nrefresh | refresh request.\nreload  | reload request.\nscan    | before dom element scanning.\nopen    | connected.\nclose   | disconnected.\nmessage | received a message above.\n\n(server will send 'update' events only the file matched to 'watch' option.)\n\nSome of events emit another events. (chained)\n\nevent   | emits\n:---    |:---\nmessage | (any events by server response)\nupdate  | scan\nscan    | refresh, reload\nreload  | refresh (on failed or canceled)\n\ninternal operation and chain of event emission are cancelable by using \"event.preventDefault()\".\n\nevent listeners will receive an event object with 'detail' key.\nand the 'detail' object has some of parameters below.\n\nkey       | desc\n:---      |:---\nclient    | client module instance.\npath      | path of file updated.\nurl       | url of file updated.\ntype      | original message type from server.\nscan      | scan target list.\nreload    | reload or not. (on reload event, set false to switch 'refresh')\ntarget    | dom object of refresh target.\ntargetUrl | url of refresh target. (url which contained as dom attribute)\n\nand the contents of './examples' may be a useful reference for usage of client module.\nor see '[src/client.ls](./src/client.ls)' for more information.\n\nVersion\n----\n0.2.15\n\nLicense\n----\nMIT\n\n[simple-autoreload-server]:https://github.com/cytb/simple-autoreload-server\n\n"
}
