aliasmo

1.0.3 • Public • Published

Aliasmo npm Package

Require NodeJs modules using alias

⚠️ Tested only on CommonJS system, and not too far in deep.

API

require('aliasmo')();
 
// or without modifying package.json file
 
require('aliasmo')({ 
   "@root": ".",
   "@config": "./config.js",
   "@routes": "routes/",
   "@util": "modules/util"
});

package.json

{
   "name": "app",
   "version": "0.0.1",
   "main": "app.js",
   "aliases": {
      "@root": ".",
      "@config": "./config.js",
      "@routes": "routes/",
      "@util": "modules/util"
   },
   "dependencies": {
      
   }
}

Package Sidebar

Install

npm i aliasmo

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.19 kB

Total Files

4

Last publish

Collaborators

  • tpkn