koa-requireall
Require all JS in a folder
Last updated 3 years ago by sqreept .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install koa-requireall 
SYNC missed versions from official npm registry.

koa-requireall Build Status

Koa helper to require all JS files in a folder. Based on node-requireall.

Installation

$ npm install koa-requireall

Example

var requireall = require('koa-requireall');

requireAll(path.join(__dirname, 'modules'), function*(Module){
	console.log('Module '+ Module + ' loaded.');
});

API

requireAll(folderPath, onLoadedModuleGenerator)

Loads all JS in a folder at folderPath as Node.js modules. Calls onLoadedModuleGenerator for each loaded module.

License

MIT

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2014 - 2016 © taobao.org |