require-app-root

1.0.0-a • Public • Published

require-app-root

PROJECT ABANDONED. USE requiro INSTEAD

Hack for function require allows to load a module from the application root folder, using ~/ as in the asp.net's methods (LoadControl, etc.)

INSTALLATION

npm install --save require-app-root

USAGE

Somewhere in bootstrap file of your project:

require("require-app-root");

Then you can use require with ~/

var user = require("~/library/user.js");

NOTES

It is enough to make require("require-app-root") once, there is no need to insert it in each file of your application.

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i require-app-root

    Weekly Downloads

    3

    Version

    1.0.0-a

    License

    X.Net

    Last publish

    Collaborators

    • iamthes