Comparing version 0.2.1 to 0.2.2
11
index.js
@@ -10,3 +10,2 @@ 'use strict'; | ||
var relative = require('relative'); | ||
var glob = require('globby'); | ||
@@ -24,3 +23,3 @@ /** | ||
module.exports = function mapFiles(patterns, options) { | ||
var files = glob.sync(patterns, options); | ||
var files = globber(patterns, options); | ||
var cwd = options && options.cwd || process.cwd(); | ||
@@ -38,2 +37,10 @@ | ||
function globber(patterns, options) { | ||
if (options && options.glob) { | ||
return options.glob(patterns, options); | ||
} | ||
var glob = require('globby'); | ||
return glob.sync(patterns, options); | ||
} | ||
function name(filepath, options) { | ||
@@ -40,0 +47,0 @@ if (options && options.name) { |
{ | ||
"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.2.1", | ||
"version": "0.2.2", | ||
"homepage": "https://github.com/jonschlinkert/map-files", | ||
@@ -37,5 +37,3 @@ "author": { | ||
"mocha": "*", | ||
"should": "^4.0.4", | ||
"verb": ">= 0.2.6", | ||
"verb-tag-jscomments": "^0.2.2" | ||
"should": "^4.0.4" | ||
}, | ||
@@ -42,0 +40,0 @@ "keywords": [ |
# map-files [![NPM version](https://badge.fury.io/js/map-files.svg)](http://badge.fury.io/js/map-files) | ||
> 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 | ||
#### Install with [npm](npmjs.org): | ||
### Install with [npm](npmjs.org): | ||
@@ -87,3 +86,3 @@ ```bash | ||
## License | ||
Copyright (c) 2014 Jon Schlinkert, contributors. | ||
Copyright (c) 2014 Jon Schlinkert | ||
Released under the MIT license | ||
@@ -93,4 +92,4 @@ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 16, 2014._ | ||
_This file was generated by [verb](https://github.com/assemble/verb) on November 17, 2014._ | ||
[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
3
148
11956
16
93