1.1.0 • Published 10 years ago
rootify v1.1.0
rootify
Allow root-of-project (closest package.json) requires in browserify with ^
Usage
rootify is a browserify transform.
npm i --save-dev rootifyand in your package.json:
"browserify": {
"transform": [ "rootify" ]
}And optionally..
"rootify": {
"rootPath": "./someRelativePath"
}And then, instead of:
var something = require('../../../../../something');You can use:
var something = require('^something');