register-module

0.0.2 • Public • Published

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');

Package Sidebar

Install

npm i register-module

Weekly Downloads

175

Version

0.0.2

License

MIT

Last publish

Collaborators

  • vinsonchuong