require-dir
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -106,2 +106,8 @@ // requireDir.js | ||
if (path) { | ||
// ignore TypeScript declaration files. They should never be | ||
// `require`d | ||
if (/\.d\.ts$/.test(path)) { | ||
continue; | ||
} | ||
// if duplicates are wanted, key off the full name always, and | ||
@@ -108,0 +114,0 @@ // also the base if it hasn't been taken yet (since this ext |
{ "name": "require-dir" | ||
, "description": "Helper to require() directories." | ||
, "version": "0.3.0" | ||
, "version": "0.3.1" | ||
, "author": "Aseem Kishore <aseem.kishore@gmail.com>" | ||
@@ -10,2 +10,4 @@ , "license": "MIT" | ||
, "mkdirp": "^0.5.0" | ||
, "ts-node": "^1.3.0" | ||
, "typescript": "^1.8.0" | ||
} | ||
@@ -12,0 +14,0 @@ , "engines": |
@@ -20,2 +20,12 @@ var assert = require('assert'); | ||
// now register TypeScript and do it again: | ||
// note that we include typescript files but not declarations. | ||
require('ts-node/register'); | ||
assert.deepEqual(requireDir('./simple'), { | ||
a: 'a', | ||
b: 'b', | ||
c: 'c', | ||
e: 'e', | ||
}); | ||
console.log('Simple tests passed.'); |
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
13574
34
251
4