requireindex
Advanced tools
Comparing version 1.1.0 to 1.2.0
15
index.js
@@ -35,14 +35,15 @@ var FS = require('fs'); | ||
files.forEach(function (filename) { | ||
// ignore index.js and files prefixed with underscore and | ||
if ((filename === 'index.js') || (filename[0] === '_') || (filename[0] === '.')) { | ||
return; | ||
// ignore index.js and files prefixed with underscore and | ||
if ((filename === 'index.js') || (filename[0] === '_') || (filename[0] === '.')) { | ||
return; | ||
} | ||
var filepath = Path.resolve(Path.join(dir, filename)); | ||
var ext = Path.extname(filename); | ||
var stats = FS.statSync(filepath); | ||
// don't require non-javascript files (.txt .md etc.) | ||
if (stats.isFile() && !(ext in require.extensions)) { | ||
return; | ||
var exts = ['.js', '.node', '.json']; | ||
if (stats.isFile() && (exts.indexOf(ext) === -1)) { | ||
return; | ||
} | ||
@@ -49,0 +50,0 @@ |
{ | ||
"name": "requireindex", | ||
"description": "Write minimal node index.js files that require and export siblings by file basename", | ||
"version": "1.1.0", | ||
"license" : "MIT", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
"main": "index.js", | ||
"repository": { | ||
@@ -12,7 +11,5 @@ "type": "git", | ||
}, | ||
"scripts": { | ||
"test": "node test/test.js" | ||
}, | ||
"keywords": [ | ||
@@ -23,25 +20,16 @@ "require", | ||
], | ||
"directories" : { | ||
"lib" : ".", | ||
"test" : "test" | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"bugs": { | ||
"url" : "http://github.com/stephenhandley/requireindex/issues" | ||
"url": "http://github.com/stephenhandley/requireindex/issues" | ||
}, | ||
"engines" : { | ||
"node" : ">=0.10.5" | ||
"engines": { | ||
"node": ">=0.10.5" | ||
}, | ||
"devDependencies": { | ||
"asserts": "4.0.x" | ||
}, | ||
"author": { | ||
"name": "Stephen Handley", | ||
"email": "stephen.handley@gmail.com", | ||
"url": "http://person.sh" | ||
} | ||
} | ||
"author": "Stephen Handley <stephen.handley@gmail.com> (http://person.sh)", | ||
"homepage": "https://github.com/stephenhandley/requireindex" | ||
} |
@@ -7,3 +7,3 @@ # Description | ||
1.1.0 | ||
1.2.0 | ||
@@ -91,2 +91,2 @@ # Installation | ||
#Build status | ||
[![build status](https://secure.travis-ci.org/stephenhandley/requireindex.png)](http://travis-ci.org/stephenhandley/requireindex) | ||
[![build status](https://secure.travis-ci.org/stephenhandley/requireindex.png)](http://travis-ci.org/stephenhandley/requireindex) |
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 website
QualityPackage does not have a website.
Found 1 instance in 1 package
6624
100
0
91
18