0.0.6 • Published 8 years ago

resolve-module-path v0.0.6

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

resolve-module-path

npm version Build Status Coverage Status

Lib for resolving path for requiring module with other environments

Install

//Node version >= 6
npm install resolve-module-path

Usage

var resolve = require('resolve-module-path');
console.log(resolve("./module1",{
    //Path will resolve from dir of this file
    basePath: "./path1"
}));

Look more here https://github.com/arvitaly/resolve-module-path/blob/master/spec

Options

basePath: if base path not setted, lib take path from caller (by stack)

npmPath: if npm path not setted, lib take (base path or process.cwd()) + "/node_modules"

stackDepth: you can also use this library in other library, which use resolve, look tests for example