require-dir
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -72,2 +72,6 @@ // requireDir.js | ||
if (opts.recurse) { | ||
if (base === 'node_modules') { | ||
continue; | ||
} | ||
map[base] = requireDir(path, opts); | ||
@@ -74,0 +78,0 @@ |
{ "name": "require-dir" | ||
, "description": "Helper to require() directories." | ||
, "version": "0.1.0" | ||
, "version": "0.2.0" | ||
, "author": "Aseem Kishore <aseem.kishore@gmail.com>" | ||
, "license": "MIT" | ||
, "dependencies": {} | ||
, "devDependencies": | ||
{ "coffee-script": "~1.3.3" | ||
, "mkdirp": "^0.5.0" | ||
} | ||
@@ -9,0 +11,0 @@ , "engines": |
@@ -0,1 +1,4 @@ | ||
[![Build Status](https://travis-ci.org/aseemk/requireDir.svg?branch=master)](https://travis-ci.org/aseemk/requireDir) | ||
[![npm version](https://badge.fury.io/js/require-dir.svg)](http://badge.fury.io/js/require-dir) | ||
# requireDir() | ||
@@ -27,3 +30,4 @@ | ||
And if CoffeeScript was registered, `c.coffee` will also be returned. | ||
And if CoffeeScript has been registered via `require('coffee-script/register')`, | ||
`c.coffee` will also be returned. | ||
@@ -57,2 +61,3 @@ ## Installation | ||
`recurse`: Whether to recursively `require()` subdirectories too. | ||
(`node_modules` within subdirectories will be ignored.) | ||
Default is false. | ||
@@ -110,2 +115,2 @@ | ||
MIT. © 2012 Aseem Kishore. | ||
MIT. © 2012-2015 Aseem Kishore. |
@@ -22,4 +22,10 @@ var assert = require('assert'); | ||
}, | ||
// note that node_modules was explicitly ignored | ||
}); | ||
// finally, test that node_modules can still be required directly: | ||
assert.deepEqual(requireDir('./recurse/node_modules'), { | ||
fake: 'fake', | ||
}); | ||
console.log('Recurse tests passed.'); |
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
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
11978
29
0
201
114
2