Skip to content

simon-p-r/require-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

require-plus

build status Current Version dependency Status devDependency Status Coveralls

Node module for requiring a directory tree, it will throw if not a valid directory and it will also throw if the object is not exported properly or cannot be required by require.

##Installation

npm install require-plus

##Usage

const options = {
    blacklist: ['node_modules', '.git', '.idea'],
    extensions: ['.js','.json'],
    directory: ['./test', './some/path', './some/other/path'] // can be a string or an array
};

const plus = require('require-plus')(options);
console.log(plus);
//plus is an object containing modules exported from above directories

##Todo

  • 100% code coverage
  • Handle require errors better
  • Add silent error handling option to not throw if something cannot be required by require

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published