Smart 'require' module for NodeJS
Install via npm.
npm install hero-include
Require the module once in the main script
require("hero-include");
Use method 'using' for adding folder to router and include scripts from these folders. Call include or heroInclude.
require("hero-include");
include
.using("./core")
.using("./lib");
// or
heroInclude
.using("./core")
.using("./lib");
var a = include("module_from_core_folder");
var b = include("module_from_lib_folder");