{"name":"nswatch","version":"0.2.0","description":"Like gulp.watch but for npm scripts.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/egoist/nswatch.git"},"author":{"name":"egoist","email":"0x142857@gmail.com","url":"github.com/egoist"},"engines":{"node":">=4"},"scripts":{"test":"xo src/*.js","build":"bubleup"},"watch":{"src":["build"]},"bin":{"nswatch":"cli.js"},"files":["cli.js","index.js"],"keywords":[],"devDependencies":{"ava":"latest","xo":"latest"},"xo":{"semicolon":false,"space":2,"rules":{"operator-linebreak":[2,"before"]}},"dependencies":{"cac":"^2.2.0","chalk":"^1.1.3","chokidar":"^1.6.0","cross-spawn":"^4.0.0","read-pkg":"^1.1.0"},"gitHead":"fc434ea6494831b205d43319fca739971a0fc625","bugs":{"url":"https://github.com/egoist/nswatch/issues"},"homepage":"https://github.com/egoist/nswatch#readme","_id":"nswatch@0.2.0","_shasum":"be9fe0d146f727385c3430b6b3df3a32ee5df2f5","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"kchan","email":"kchanzen@gmail.com"},"dist":{"shasum":"be9fe0d146f727385c3430b6b3df3a32ee5df2f5","tarball":"http://registry-npm.ywwl.com/nswatch/download/nswatch-0.2.0.tgz","integrity":"sha512-StbD/Z2nEIbPxUlwUOxO2sy9NtrNoLjooXxS+laVKDMh7WtXNw4OlS1wkDr+++hVUL37+7QHJE7YMszaU/kjng==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPofonwAu366iIkk2nASs8xxR3WLz++glsB3XhWjXp/AIhANXYDU/IXiV9Of7yS37khwEQJm0JwUFNRbn7N9Z9ulLz"}],"size":3347,"noattachment":false,"key":"/nswatch/-/nswatch-0.2.0.tgz"},"maintainers":[{"name":"kchan","email":"kchanzen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/nswatch-0.2.0.tgz_1472795130766_0.24252557079307735"},"readme":"# nswatch\n\n[![NPM version](https://img.shields.io/npm/v/nswatch.svg?style=flat-square)](https://npmjs.com/package/nswatch) [![NPM downloads](https://img.shields.io/npm/dm/nswatch.svg?style=flat-square)](https://npmjs.com/package/nswatch) [![Build Status](https://img.shields.io/circleci/project/egoist/nswatch/master.svg?style=flat-square)](https://circleci.com/gh/egoist/nswatch)\n\n> Like gulp.watch but for npm scripts.\n\n## Install\n\n```bash\n$ npm install -D nswatch\n```\n\n## Usage\n\nAssuming you have an npm script `build` to compile something, then drop a `watch.js` in your project:\n\n```js\nconst watch = require('nswatch')\n\nwatch('src/*.js', ['build'])\n```\n\nWhen you run `node watch`, the `npm run build` will be invoked right away, and will also be invoked when file changes are detected.\n\n<img src=\"./media/preview.png\" width=\"500\" />\n\n### Parallel and Sequence\n\n`Array` will be treated as parallel, `String` will be treated as sequence:\n\n```js\n// run in parallel\nwatch('src/a.js', ['task-a', 'task-b'])\n// run in sequence\n// use ! as seperator\nwatch('src/b.js', 'task-a!task-b')\n```\n\n## CLI\n\n```bash\n$ npm install -g nswatch\n```\n\nYou can also use `nswatch` as a command-line program:\n\n### Configure `watch` in `package.json`\n\n```json\n{\n  \"watch\": {\n    \"./src/*.js\": [\"build\"],\n    \"./src/*.css\": \"compile!minify\"\n  }\n}\n```\n\nThen run:\n\n```bash\n$ nswatch\n```\n\nOr you can pass the config via CLI arguments, this way configurations in `package.json` will be ignored.\n\n```bash\n# in parallel\n$ nswatch \"src/*.js\" --script foo --script bar\n\n# in sequence\n$ nswatch \"src/*.js\" --script \"foo!bar\"\n```\n\n## Author\n\n**nswatch** © [EGOIST](https://github.com/egoist), Released under the [MIT](https://egoist.mit-license.org/) License.<br>\nAuthored and maintained by EGOIST with help from contributors ([list](https://github.com/egoist/nswatch/contributors)).\n\n> [egoistian.com](https://egoistian.com) · GitHub [@egoist](https://github.com/egoist) · Twitter [@rem_rin_rin](https://twitter.com/rem_rin_rin)\n","publish_time":1472795134026,"_cnpm_publish_time":1472795134026,"dist-tags":{"latest":"0.2.0"}}