Comparing version 0.7.5 to 0.7.6
@@ -11,3 +11,3 @@ 'use strict'; | ||
var lazy = require('lazy-cache')(require); | ||
lazy('globby', 'glob'); | ||
lazy('matched', 'glob'); | ||
lazy('micromatch', 'mm'); | ||
@@ -56,3 +56,3 @@ | ||
function reduce(files, opts) { | ||
return files.reduce(function (acc, fp) { | ||
return files.reduce(function(acc, fp) { | ||
fp = path.resolve(opts.cwd, fp); | ||
@@ -117,3 +117,3 @@ var key = name(fp, acc, opts); | ||
var key = name + ':' + cwd + '/' + patterns; | ||
return function () { | ||
return function() { | ||
if (cache.hasOwnProperty(key)) { | ||
@@ -120,0 +120,0 @@ return cache[key]; |
{ | ||
"name": "map-files", | ||
"description": "Return an object for a glob of files. Pass a `rename` function for the keys, or a `parse` function for the content, allowing it to be used for readable or require-able files.", | ||
"version": "0.7.5", | ||
"version": "0.7.6", | ||
"homepage": "https://github.com/jonschlinkert/map-files", | ||
"author": { | ||
"name": "Jon Schlinkert", | ||
"url": "https://github.com/jonschlinkert" | ||
}, | ||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)", | ||
"repository": "jonschlinkert/map-files", | ||
@@ -26,12 +23,12 @@ "bugs": { | ||
"dependencies": { | ||
"globby": "^2.1.0", | ||
"lazy-cache": "^0.2.3", | ||
"micromatch": "^2.2.0" | ||
"lazy-cache": "^1.0.4", | ||
"matched": "^0.4.1", | ||
"micromatch": "^2.3.8" | ||
}, | ||
"devDependencies": { | ||
"extend-shallow": "^1.1.1", | ||
"gray-matter": "^1.0.1", | ||
"mocha": "*", | ||
"relative": "^2.0.0", | ||
"should": "^5.0.0" | ||
"extend-shallow": "^2.0.1", | ||
"gray-matter": "^2.0.2", | ||
"mocha": "^2.4.5", | ||
"relative": "^3.0.2", | ||
"should": "^8.3.1" | ||
}, | ||
@@ -55,3 +52,13 @@ "keywords": [ | ||
"paths" | ||
] | ||
], | ||
"verb": { | ||
"related": { | ||
"list": [ | ||
"file-reader", | ||
"filter-files", | ||
"micromatch", | ||
"export-files" | ||
] | ||
} | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# map-files [![NPM version](https://badge.fury.io/js/map-files.svg)](http://badge.fury.io/js/map-files) [![Build Status](https://travis-ci.org/jonschlinkert/map-files.svg)](https://travis-ci.org/jonschlinkert/map-files) | ||
# map-files [![NPM version](https://img.shields.io/npm/v/map-files.svg?style=flat)](https://www.npmjs.com/package/map-files) [![Build Status](https://img.shields.io/travis/jonschlinkert/map-files.svg?style=flat)](https://travis-ci.org/jonschlinkert/map-files) | ||
@@ -7,6 +7,8 @@ > Return an object for a glob of files. Pass a `rename` function for the keys, or a `parse` function for the content, allowing it to be used for readable or require-able files. | ||
Install with [npm](https://www.npmjs.com/) | ||
## Install | ||
Install with [npm](https://www.npmjs.com/): | ||
```sh | ||
$ npm i map-files --save | ||
$ npm install map-files --save | ||
``` | ||
@@ -20,3 +22,2 @@ | ||
``` | ||
Returns an object that looks something like: | ||
@@ -65,3 +66,2 @@ | ||
``` | ||
Returns something like: | ||
@@ -96,22 +96,18 @@ | ||
## Other files libs | ||
* [export-files](https://www.npmjs.com/package/export-files): node.js utility for exporting a directory of files as modules. | [homepage](https://github.com/jonschlinkert/export-files) | ||
* [file-reader](https://www.npmjs.com/package/file-reader): Read a glob of files, dynamically choosing the reader or requiring the files based on… [more](https://www.npmjs.com/package/file-reader) | [homepage](https://github.com/jonschlinkert/file-reader) | ||
* [filter-files](https://www.npmjs.com/package/filter-files): Recursively read directories and return a list of files, filtered to have only the files… [more](https://www.npmjs.com/package/filter-files) | [homepage](https://github.com/jonschlinkert/filter-files) | ||
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch) | ||
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch) | ||
## Running tests | ||
Install dev dependencies: | ||
```sh | ||
$ npm i -d && npm test | ||
$ npm install -d && npm test | ||
``` | ||
## Contributing | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-files/issues/new). | ||
## Author | ||
**Jon Schlinkert** | ||
@@ -123,8 +119,9 @@ | ||
## License | ||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). | ||
Released under the [MIT license](https://github.com/jonschlinkert/map-files/blob/master/LICENSE). | ||
Copyright © 2014-2015 Jon Schlinkert | ||
Released under the MIT license. | ||
*** | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 21, 2015._ | ||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on April 23, 2016._ | ||
[globby]: https://github.com/sindresorhus/globby |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9582
123
+ Addedmatched@^0.4.1
+ Addedarr-union@3.1.0(transitive)
+ Addedasync-array-reduce@0.2.1(transitive)
+ Addedexpand-tilde@1.2.2(transitive)
+ Addedextend-shallow@2.0.1(transitive)
+ Addedfs-exists-sync@0.1.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedglobal-modules@0.2.3(transitive)
+ Addedglobal-prefix@0.1.5(transitive)
+ Addedhas-glob@0.1.1(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-valid-glob@0.3.0(transitive)
+ Addedis-windows@0.2.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedlazy-cache@1.0.42.0.2(transitive)
+ Addedmatched@0.4.4(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedresolve-dir@0.1.1(transitive)
+ Addedset-getter@0.1.1(transitive)
+ Addedto-object-path@0.3.0(transitive)
+ Addedwhich@1.3.1(transitive)
- Removedglobby@^2.1.0
- Removedarray-union@1.0.2(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedasync@1.5.2(transitive)
- Removedglob@5.0.15(transitive)
- Removedglobby@2.1.0(transitive)
- Removedlazy-cache@0.2.7(transitive)
- Removedobject-assign@3.0.0(transitive)
Updatedlazy-cache@^1.0.4
Updatedmicromatch@^2.3.8