Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    use-requirepublic

    use-require

    Imagine the require command to import your files, without having to specify the full path

    Setup

    You need to specify where to find your libraries, as soon as your app starts:

    require('use-require').setup([ <TheDirectoryContainingYourCode> ]);

    for example:

    require('use-require').setup([ __dirname + '/code' ]);

    Usage

    Once the module is setup, it creates a global function use which can be used to include your own modules.

    for example:

    var mylib = use('mylib');

    Keywords

    none

    install

    npm i use-require

    Downloadsweekly downloads

    2

    version

    0.0.2

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar