0.4.0 • Published 8 years ago

alias-require v0.4.0

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

alias-require

use require('@alias/file.js') to require a local file without the ../../../ problem

usage

index.js
    const alias = require('alias-require');

    alias({
        root: __dirname
    });

    require('./path/to/a/module');
path/to/a/module.js
    require('@root/another/path/to/a/module');
another/path/to/a/module.js
    console.log('YEAH!!');
0.4.0

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.2

8 years ago