0.0.2 • Published 8 years ago

register-module v0.0.2

Weekly downloads
378
License
MIT
Repository
github
Last release
8 years ago

register-module

Register a module with Node.js for more concise imports.

Installing

register-module is available as an npm package.

Usage

require('register-module')({
  name: 'project',
  path: '/home/vinsonchuong/project',
  main: 'entry.js'
});

// Resolves to '/home/vinsonchuong/project/entry.js'
require('project');

// Resolves to '/home/vinsonchuong/project/lib.js'
require('project/lib');