Home Reference Source Repository

anytv-node-importer

Build Status Coverage Status Documentation Dependencies npm version

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 (https://doc.esdoc.org/github.com/anyTV/anytv-node-importer/)[https://doc.esdoc.org/github.com/anyTV/anytv-node-importer/].

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

Author

Freedom! Labs, any.TV Limited DBA Freedom!