anytv-node-importer
v0.0.7
Published
Require all files in directory
Downloads
99
Readme
anytv-node-importer
Require files in a folder and turn them into an object. Especially made for our awesome expressjs boilerplate.
Install
npm install anytv-node-importer --save
Usage
Importing all files in a folder
import importer from 'anytv-node-importer';
const imports = importer.dirloadSync('./controllers');
Documentation
Code documentation can be found at here.
Contributing
Install the tools needed:
npm install babel -g
npm install esdoc -g
npm install mocha -g
npm install --dev
To compile the ES6 source code to ES5:
npm run compile
To generate the docs:
npm run docs
Running test
npm test
Code coverage
npm run coverage
Then open coverage/lcov-report/index.html.
License
MIT