forked from FerencKun/angular-datatable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
48 lines (48 loc) · 5.34 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"name": "chokidar",
"description": "A neat wrapper around node.js fs.watch / fs.watchFile.",
"version": "0.6.3",
"keywords": [
"fs",
"watch",
"watchFile",
"watcher",
"file"
],
"homepage": "https://github.com/paulmillr/chokidar",
"author": {
"name": "Paul Miller",
"url": "http://paulmillr.com"
},
"repository": {
"type": "git",
"url": "https://github.com/paulmillr/chokidar.git"
},
"bugs": {
"url": "http://github.com/paulmillr/chokidar/issues"
},
"licenses": [
{
"type": "MIT",
"url": "http://github.com/paulmillr/chokidar/raw/master/README.md"
}
],
"main": "./lib/index",
"scripts": {
"prepublish": "node setup.js prepublish",
"postpublish": "node setup.js postpublish",
"test": "node setup.js test"
},
"dependencies": {},
"devDependencies": {
"mocha": "~1.7.3",
"chai": "~1.4.0",
"sinon": "~1.5.2",
"sinon-chai": "2.2.0",
"coffee-script": "~1.6.0"
},
"readme": "# Chokidar\nA neat wrapper around node.js fs.watch / fs.watchFile.\n\n## Why?\nNode.js `fs.watch`:\n\n* Doesn't report filenames on mac.\n* Doesn't report events at all when using editors like TextMate2 on mac.\n* Sometimes report events twice.\n* Has only one non-useful event: `rename`.\n* Has [a lot of other issues](https://github.com/joyent/node/search?q=fs.watch&type=Issues)\n\nNode.js `fs.watchFile`:\n\n* Almost as shitty in event tracking.\n\nChokidar resolves this problems.\n\nIt is used in\n[brunch](http://brunch.io),\n[socketstream](http://www.socketstream.org),\nand [karma](http://karma-runner.github.io)\nand had proven itself in production env.\n\n## Getting started\nInstall chokidar via node.js package manager:\n\n npm install chokidar\n\nThen just require the package in your code:\n\n```javascript\nvar chokidar = require('chokidar');\n\nvar watcher = chokidar.watch('file or dir', {ignored: /^\\./, persistent: true});\n\nwatcher\n .on('add', function(path) {console.log('File', path, 'has been added');})\n .on('change', function(path) {console.log('File', path, 'has been changed');})\n .on('unlink', function(path) {console.log('File', path, 'has been removed');})\n .on('error', function(error) {console.error('Error happened', error);})\n\n// 'add' and 'change' events also receive stat() results as second argument.\n// http://nodejs.org/api/fs.html#fs_class_fs_stats\nwatcher.on('change', function(path, stats) {\n console.log('File', path, 'changed size to', stats.size);\n});\n\nwatcher.add('new-file');\nwatcher.add(['new-file-2', 'new-file-3']);\n\n// Only needed if watching is persistent.\nwatcher.close();\n```\n\n## API\n* `chokidar.watch(paths, options)`: takes paths to be watched and options:\n * `options.ignored` (regexp or function) files to be ignored.\n This function or regexp is tested against the **whole path**,\n not just filename. Example:\n `chokidar.watch('file', {ignored: /^\\./})`.\n * `options.persistent` (default: `false`). Indicates whether the process\n should continue to run as long as files are being watched.\n * `options.ignorePermissionErrors` (default: `false`). Indicates\n whether to watch files that don't have read permissions or not.\n * `options.ignoreInitial` (default: `false`). Indicates whether chokidar\n should ignore initial `add` events or not.\n * `options.interval` (default: `100`). Interval of file system polling.\n * `options.binaryInterval` (default: `300`). Interval of file system \n polling for binary files (see extensions in src/is-binary).\n * `options.usePolling` (default: `true`). Whether to use fs.watchFile \n (backed by polling), or fs.watch. If polling leads to high CPU utilization, \n consider setting this to `false`.\n\n`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:\n\n* `.add(file / files)`: add directories / files for tracking.\nTakes an array of strings (file paths) or just one path.\n* `.on(event, callback)`: listen for an FS event.\nAvailable events: `add`, `change`, `unlink`, `error`.\nAlso, `all` is available which emitted for every `add`, `change` and `unlink`.\n* `.close()`: remove all listeners from watched files.\n\n## License\nThe MIT license.\n\nCopyright (c) 2013 Paul Miller (http://paulmillr.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
"readmeFilename": "README.md",
"_id": "chokidar@0.6.3",
"_from": "chokidar@~0.6"
}