0.0.6 • Published 8 years ago

require-hash v0.0.6

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

Require-hash

This package allows you to require files relative to your projects package.json folder.

Usage:

# Project folder
.
├── README.md
└── src
    ├── app.js
    ├── lib
    │   └── search.js
    ├── modules
    │   └── user.js
    └── node_modules

# File: app.js
require('require-hash');

# File: modules/user.js
const search = require('#lib/search');

Change the symbol

The hash symbol can be changed to something else by called the updateSymbol method.

require('require-hash')
# File: app.js
require('require-hash').updateSymbol('@');

# File: modules/user.js
const search = require('@lib/search');
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago