{"_id":"ava-files","_rev":"299617","name":"ava-files","description":"File resolution for AVA","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"novemberborn","email":"mark@novemberborn.net"}],"time":{"modified":"2021-06-03T19:03:32.000Z","created":"2016-06-19T02:49:28.909Z","1.0.0":"2016-12-09T17:14:18.803Z","0.2.0":"2016-08-11T12:58:04.458Z","0.1.1":"2016-06-19T03:05:55.764Z","0.1.0":"2016-06-19T02:49:28.909Z"},"users":{},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/avajs"},"repository":{"type":"git","url":"git+https://github.com/avajs/ava-files.git"},"versions":{"1.0.0":{"name":"ava-files","version":"1.0.0","description":"File resolution for AVA","license":"MIT","repository":{"type":"git","url":"git+https://github.com/avajs/ava-files.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/avajs"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["ava","files","find","glob"],"dependencies":{"auto-bind":"^0.1.0","bluebird":"^3.4.1","globby":"^6.0.0","ignore-by-default":"^1.0.1","lodash.flatten":"^4.2.0","multimatch":"^2.1.0","slash":"^1.0.0"},"devDependencies":{"ava":"^0.16.0","coveralls":"^2.11.9","nyc":"^7.1.0","xo":"^0.16.0"},"ava":{"files":["test.js"]},"nyc":{"reporter":["lcov","text"]},"gitHead":"e87042b06922e2cc54c4b0a428085cebd4d2c23c","bugs":{"url":"https://github.com/avajs/ava-files/issues"},"homepage":"https://github.com/avajs/ava-files#readme","_id":"ava-files@1.0.0","_shasum":"9789e4bf1ac233e4af0903e879bdae3819f27235","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"novemberborn","email":"mark@novemberborn.net"},"dist":{"shasum":"9789e4bf1ac233e4af0903e879bdae3819f27235","size":4337,"noattachment":false,"key":"/ava-files/-/ava-files-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ava-files/download/ava-files-1.0.0.tgz"},"maintainers":[{"name":"novemberborn","email":"mark@novemberborn.net"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ava-files-1.0.0.tgz_1481303658036_0.41297994391061366"},"directories":{},"publish_time":1481303658803,"_cnpm_publish_time":1481303658803,"_hasShrinkwrap":false},"0.2.0":{"name":"ava-files","version":"0.2.0","description":"File resolution for AVA","license":"MIT","repository":{"type":"git","url":"git+https://github.com/avajs/ava-files.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/avajs"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["ava","files","find","glob"],"dependencies":{"auto-bind":"^0.1.0","bluebird":"^3.4.1","globby":"^6.0.0","ignore-by-default":"^1.0.1","lodash.flatten":"^4.2.0","multimatch":"^2.1.0","slash":"^1.0.0"},"devDependencies":{"ava":"^0.16.0","coveralls":"^2.11.9","nyc":"^7.1.0","xo":"^0.16.0"},"ava":{"files":["test.js"]},"nyc":{"reporter":["lcov","text"]},"gitHead":"f4daaa5af152cebb4a59bd98400fc60edd5a456a","bugs":{"url":"https://github.com/avajs/ava-files/issues"},"homepage":"https://github.com/avajs/ava-files#readme","_id":"ava-files@0.2.0","_shasum":"c7b8b6e2e0cea63b57a6e27e0db145c7c19cfe20","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c7b8b6e2e0cea63b57a6e27e0db145c7c19cfe20","size":4130,"noattachment":false,"key":"/ava-files/-/ava-files-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ava-files/download/ava-files-0.2.0.tgz"},"maintainers":[{"name":"novemberborn","email":"mark@novemberborn.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ava-files-0.2.0.tgz_1470920282454_0.1428374038077891"},"directories":{},"publish_time":1470920284458,"_cnpm_publish_time":1470920284458,"_hasShrinkwrap":false},"0.1.1":{"name":"ava-files","version":"0.1.1","description":"File resolution for AVA","license":"MIT","repository":{"type":"git","url":"git+https://github.com/avajs/ava-files.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/avajs"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["ava","files"],"dependencies":{"arr-flatten":"^1.0.1","bluebird":"^3.4.1","globby":"^5.0.0","ignore-by-default":"^1.0.1","multimatch":"^2.1.0","slash":"^1.0.0"},"devDependencies":{"ava":"^0.15.1","coveralls":"^2.11.9","nyc":"^6.4.0","xo":"^0.16.0"},"ava":{"files":["test.js"]},"nyc":{"reporter":["lcov","text"]},"gitHead":"7ac819fcee46c187d37e6e2e90d4993551ec2d35","bugs":{"url":"https://github.com/avajs/ava-files/issues"},"homepage":"https://github.com/avajs/ava-files#readme","_id":"ava-files@0.1.1","_shasum":"18abb6f4b87029c32fc35f2053fecd3a55f1d2b0","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.10.1","_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"dist":{"shasum":"18abb6f4b87029c32fc35f2053fecd3a55f1d2b0","size":4132,"noattachment":false,"key":"/ava-files/-/ava-files-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ava-files/download/ava-files-0.1.1.tgz"},"maintainers":[{"name":"novemberborn","email":"mark@novemberborn.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ava-files-0.1.1.tgz_1466305553532_0.6873789655510336"},"directories":{},"publish_time":1466305555764,"_cnpm_publish_time":1466305555764,"_hasShrinkwrap":false},"0.1.0":{"name":"ava-files","version":"0.1.0","description":"File resolution for AVA","license":"MIT","repository":{"type":"git","url":"git+https://github.com/avajs/ava-files.git"},"author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/avajs"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && nyc ava"},"files":["index.js"],"keywords":["ava","files"],"dependencies":{"arr-flatten":"^1.0.1","bluebird":"^3.4.1","globby":"^5.0.0","ignore-by-default":"^1.0.1","multimatch":"^2.1.0","slash":"^1.0.0"},"devDependencies":{"ava":"^0.15.1","coveralls":"^2.11.9","nyc":"^6.4.0","xo":"^0.16.0"},"ava":{"files":["test.js"]},"nyc":{"reporter":["lcov","text"]},"gitHead":"9e07970e5cee12d7707d75f66f54a3413f9be920","bugs":{"url":"https://github.com/avajs/ava-files/issues"},"homepage":"https://github.com/avajs/ava-files#readme","_id":"ava-files@0.1.0","_shasum":"816867eb0302234e279aa98cb59893ab4b8d244b","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.1","_npmUser":{"name":"jamestalmage","email":"james@talmage.io"},"dist":{"shasum":"816867eb0302234e279aa98cb59893ab4b8d244b","size":1861,"noattachment":false,"key":"/ava-files/-/ava-files-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ava-files/download/ava-files-0.1.0.tgz"},"maintainers":[{"name":"novemberborn","email":"mark@novemberborn.net"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ava-files-0.1.0.tgz_1466304567577_0.9005028856918216"},"directories":{},"publish_time":1466304568909,"_cnpm_publish_time":1466304568909,"_hasShrinkwrap":false}},"readme":"# ava-files [![Build Status](https://travis-ci.org/avajs/ava-files.svg?branch=master)](https://travis-ci.org/avajs/ava-files) [![Coverage Status](https://coveralls.io/repos/github/avajs/ava-files/badge.svg?branch=master)](https://coveralls.io/github/avajs/ava-files?branch=master)\n\n> File resolution for [AVA](https://ava.li)\n\n\n## Install\n\n```\n$ npm install --save ava-files\n```\n\n\n## Usage\n\n```js\nconst AvaFiles = require('ava-files');\n\nconst avaFiles = new AvaFiles({\n\tcwd: '/path/to/cwd',\n\tfiles: ['**/glob/patterns/**'],\n\tsources: ['**/glob/patterns/**']\n});\n\navaFiles.isTest(filePath);\n//=> true or false\n\navaFiles.isSource(filePath);\n//=> true or false\n\navaFiles.findTestFiles().then(files => {\n\t// files is an array of found test files\n});\n\navaFiles.findTestHelpers().then(files => {\n\t// files is an array of found test helpers\n});\n```\n\n\n## API\n\n### avaFiles = new AvaFiles([options])\n\n#### options\n\n##### files\n\nType: `Array` of `string` glob patterns\n\nDefault:\n\n```js\n[\n\t'test.js',\n\t'test-*.js',\n\t'test',\n\t'**/__tests__',\n\t'**/*.test.js',\n\t'!**/node_modules/**',\n\t'!**/fixtures/**',\n\t'!**/helpers/**'\n]\n```\n\n##### sources\n\nType: `Array` of `string` glob patterns<br>\nDefault: `[]`\n\n##### cwd\n\nType: `string`<br>\nDefault: `process.cwd()`\n\nThe base directory to search for files from.\n\n### avaFiles.isTest(filePath)\n\nValidate if `filePath` is a test file.\n\n#### filePath\n\nType: `string`\n\nPath to the file.\n\n### avaFiles.isSource(filePath)\n\nValidate if `filePath` is a source file.\n\n#### filePath\n\nType: `string`\n\nPath to the file.\n\n### avaFiles.findTestFiles()\n\nReturns a `Promise` for an `Array` of `string` paths to the found test files.\n\n### avaFiles.findTestHelpers()\n\nReturns a `Promise` for an `Array` of `string` paths to the found helper files.\n\n\n## License\n\nMIT © [James Talmage](https://github.com/avajs)\n","_attachments":{},"homepage":"https://github.com/avajs/ava-files#readme","bugs":{"url":"https://github.com/avajs/ava-files/issues"},"license":"MIT"}