node-query/node_modules/grunt-istanbul/node_modules/istanbul/node_modules/fileset/package.json

35 lines
3.7 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"author": {
"name": "mklabs"
},
"name": "fileset",
"description": "Wrapper around miniglob / minimatch combo to allow multiple patterns matching and include-exclude ability",
"version": "0.1.5",
"homepage": "https://github.com/mklabs/node-fileset",
"repository": {
"type": "git",
"url": "git://github.com/mklabs/node-fileset.git"
},
"main": "./lib/fileset",
"scripts": {
"test": "node tests/test.js"
},
"dependencies": {
"minimatch": "0.x",
"glob": "3.x"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/mklabs/node-fileset/blob/master/LICENSE-MIT"
}
],
"readme": "# node-fileset\n\nExposes a basic wrapper on top of\n[Glob](https://github.com/isaacs/node-glob) /\n[minimatch](https://github.com/isaacs/minimatch) combo both written by\n@isaacs. Glob now uses JavaScript instead of C++ bindings which makes it\nusable in Node.js 0.6.x and Windows platforms.\n\n[![Build Status](https://secure.travis-ci.org/mklabs/node-fileset.png)](http://travis-ci.org/mklabs/node-fileset)\n\nAdds multiples patterns matching and exlude ability. This is\nbasically just a sugar API syntax where you can specify a list of includes\nand optional exclude patterns. It works by setting up the necessary\nminiglob \"fileset\" and filtering out the results using minimatch.\n\n## Install\n\n npm install fileset\n\n## Usage\n\nCan be used with callback or emitter style.\n\n* **include**: list of glob patterns `foo/**/*.js *.md src/lib/**/*`\n* **exclude**: *optional* list of glob patterns to filter include\n results `foo/**/*.js *.md`\n* **callback**: *optional* function that gets called with an error if\n something wrong happend, otherwise null with an array of results\n\nThe callback is optional since the fileset method return an instance of\nEventEmitter which emit different events you might use:\n\n* *match*: Every time a match is found, miniglob emits this event with\n the pattern.\n* *include*: Emitted each time an include match is found.\n* *exclude*: Emitted each time an exclude match is found and filtered\n out from the fileset.\n* *end*: Emitted when the matching is finished with all the matches\n found, optionally filtered by the exclude patterns.\n\n#### Callback\n\n```js\nvar fileset = require('fileset');\n\nfileset('**/*.js', '**.min.js', function(err, files) {\n if (err) return console.error(err);\n\n console.log('Files: ', files.length);\n console.log(files);\n});\n```\n\n#### Event emitter\n\n```js\nvar fileset = require('fileset');\n\nfileset('**.coffee README.md *.json Cakefile **.js', 'node_modules/**')\n .on('match', console.log.bind(console, 'error'))\n .on('include', console.log.bind(console, 'includes'))\n .on('exclude', console.log.bind(console, 'excludes'))\n .on('end', console.log.bind(console, 'end'));\n```\n\n`fileset` returns an instance of EventEmitter, with an `includes` property\nwhich is the array of Fileset objects (inheriting from\n`miniglob.Miniglob`) that were used during the mathing process, should\nyou want to use them individually.\n\nCheck out the\n[tests](https://github.com/mklabs/node-fileset/tree/master/tests) for\nmore examples.\n\n## Tests\n\nRun `npm test`\n\n## Why\n\nMainly for a build tool with cake files, to provide me an easy way to get\na list of files by either using glob or path patterns, optionally\nallowing exclude patterns to filter out the results.\n\nAll the magic is happening in\n[Glob](https://github.com/isaacs/node-glob) and\n[minimatch](https://github.com/isaacs/minimatch). Check them out!\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/mklabs/node-fileset/issues"
},
"_id": "fileset@0.1.5",
"_from": "fileset@0.1.x"
}