resolve-from-caller
v1.0.1
Published
Resolve module paths relative to caller module file.
Downloads
2
Readme
resolve-from-caller
Resolve module paths relative to caller module file.
Installation
npm install --save resolve-from-caller
Usage
lib/index.js:
const resolve = require('resolve-from-caller');
console.log(resolve('./a'));
//-> a.js
user-land.js:
const lib = require('./lib');
a.js:
// anything
Credits
This module begin as a PR to module-resolve-as-caller.
License
The MIT License (MIT)
Copyright (c) 2016 Andrea Parodi