motion
Version:
motion - moving development forward
90 lines (89 loc) • 6.53 kB
JSON
{
"_args": [
[
"gulp-watch@https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "gulp-watch@4.3.5",
"_id": "gulp-watch@4.3.5",
"_inCache": true,
"_location": "/gulp-watch",
"_phantomChildren": {
"clone": "1.0.2",
"clone-stats": "0.0.1",
"replace-ext": "0.0.1"
},
"_requested": {
"name": "gulp-watch",
"raw": "gulp-watch@https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz",
"rawSpec": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz",
"type": "remote"
},
"_requiredBy": [
"/"
],
"_resolved": "https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz",
"_shasum": "3a94584d653f5c7f1aadd8d7791174b5fab048af",
"_shrinkwrap": null,
"_spec": "gulp-watch@https://registry.npmjs.org/gulp-watch/-/gulp-watch-4.3.5.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"name": "Vsevolod Strukchinsky"
},
"bugs": {
"url": "https://github.com/floatdrop/gulp-watch/issues"
},
"dependencies": {
"anymatch": "^1.3.0",
"chokidar": "^1.0.3",
"glob": "^5.0.13",
"glob2base": "0.0.12",
"gulp-util": "^3.0.6",
"path-is-absolute": "^1.0.0",
"readable-stream": "^2.0.1",
"vinyl": "^0.5.0",
"vinyl-file": "^1.2.1"
},
"description": "Watch, that actually is an endless stream",
"devDependencies": {
"coveralls": "^2.7.0",
"istanbul": "^0.3.0",
"mocha": "^2",
"mocha-lcov-reporter": "0.0.2",
"proxyquire": "^1.0.1",
"rimraf": "^2.2.8",
"should": "~7",
"sinon": "^1.9.1",
"stream-assert": "^2.0.1",
"strip-ansi": "^3.0.0"
},
"engine": "node >= 0.10",
"files": [
"index.js"
],
"homepage": "https://github.com/floatdrop/gulp-watch#readme",
"keywords": [
"gulp",
"gulpplugin",
"watch"
],
"license": "MIT",
"main": "index.js",
"name": "gulp-watch",
"optionalDependencies": {},
"readme": "# [gulp](https://github.com/gulpjs/gulp)-watch [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]\n\nFile watcher that uses super-fast [chokidar](https://github.com/paulmillr/chokidar) and emits vinyl objects.\n\n## Installation\n\nRun `npm install --save-dev gulp-watch`.\n\n## Usage\n\n```js\nvar gulp = require('gulp'),\n watch = require('gulp-watch');\n\ngulp.task('stream', function () {\n return gulp.src('css/**/*.css')\n .pipe(watch('css/**/*.css'))\n .pipe(gulp.dest('build'));\n});\n\ngulp.task('callback', function (cb) {\n watch('css/**/*.css', function () {\n gulp.src('css/**/*.css')\n .pipe(watch('css/**/*.css'))\n .on('end', cb);\n });\n});\n```\n\n> __Protip:__ until gulpjs 4.0 is released, you can use [gulp-plumber](https://github.com/floatdrop/gulp-plumber) to prevent stops on errors.\n\nMore examples can be found in [`docs/readme.md`](/docs/readme.md).\n\n## API\n\n### watch(glob, [options, callback])\n\nCreates a watcher that will spy on files that are matched by `glob` which can be a\nglob string or array of glob strings.\n\nReturns a pass through stream that will emit vinyl files\n(with additional `event` property) that corresponds to event on file-system.\n\n#### Callback `function(vinyl)`\n\nThis function is called when events happen on the file-system.\nAll incoming files that are piped in are grouped and passed to the `events` stream as is.\n\n * `vinyl` — is [vinyl](https://github.com/wearefractal/vinyl) object that corresponds to the file that caused the event. Additional `event` field is added to determine what caused changes.\n\nPossible events:\n\n * `add` - file was added to watch or created\n * `change` - file was changed\n * `unlink` - file was deleted\n\n#### Options\n\nThis object is passed to the [`chokidar` options](https://github.com/paulmillr/chokidar#api) directly. Options for [`gulp.src`](https://github.com/gulpjs/gulp/blob/master/docs/API.md#options) are also available. If you do not want content from `watch`, then add `read: false` to the `options` object.\n\n#### options.[ignoreInitial](https://github.com/paulmillr/chokidar#path-filtering)\nType: `Boolean` \nDefault: `true`\n\n> Indicates whether chokidar should ignore the initial add events or not.\n\n#### options.events\nType: `Array` \nDefault: `['add', 'change', 'unlink']`\n\nList of events, that should be watched by gulp-watch. Contains [event names from chokidar](https://github.com/paulmillr/chokidar#events).\n\n#### options.base\nType: `String` \nDefault: `undefined`\n\nUse explicit base path for files from `glob`. Read more about `base` and `cwd` in [gulpjs docs](https://github.com/gulpjs/gulp/blob/master/docs/API.md#options).\n\n#### options.name\nType: `String` \nDefault: `undefined`\n\nName of the watcher. If it is present in options, you will get more readable output.\n\n#### options.verbose\nType: `Boolean` \nDefault: `false`\n\nThis option will enable verbose output.\n\n#### options.readDelay\nType: `Number` \nDefault: `10`\n\nWait for `readDelay` milliseconds before reading the file.\n\n### Methods\n\nReturned `Stream` from constructor has some useful methods:\n\n * `add(path / paths)`\n * `unwatch(path / paths)`\n * `close()`\n\n### Events\n\nAll events from [chokidar](npmjs.com/chokidar):\n\n * `add`, `change`, `unlink`, `addDir`, `unlinkDir`, `error`, `ready`, `raw`\n\n\n### [Changelog](https://github.com/floatdrop/gulp-watch/releases)\n\n## License\n\nMIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com)\n\n[npm-url]: https://npmjs.org/package/gulp-watch\n[npm-image]: http://img.shields.io/npm/v/gulp-watch.svg?style=flat\n\n[travis-url]: https://travis-ci.org/floatdrop/gulp-watch\n[travis-image]: http://img.shields.io/travis/floatdrop/gulp-watch.svg?style=flat\n\n[depstat-url]: https://david-dm.org/floatdrop/gulp-watch\n[depstat-image]: http://img.shields.io/david/floatdrop/gulp-watch.svg?style=flat\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/floatdrop/gulp-watch.git"
},
"scripts": {
"coverage": "istanbul cover node_modules/.bin/_mocha --report html -- -R spec",
"coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage",
"test": "mocha -R spec test/test-*"
},
"version": "4.3.5"
}