nsjs
v0.1.5
Published
Use namespaces on NodeJS
Downloads
3
Readme
nsjs
Use namespaces with NodeJS.
Usage
On your app, add the namespaces:
var ns = require('nsjs');
ns.configure({
dir: __dirname
});
ns.add('MyApplication\\', 'modules/application/');
ns.add('Blog\\', 'modules/blog/');
and in every file your can use like this:
var ns = require('nsjs')
, usersController = ns.use('MyApplication\\Controller\\Users');
instead
var usersController = require('modules/application/controller/users');