resolve-module-path
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

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

/resolve-module-path/

    Package Sidebar

    Install

    npm i resolve-module-path

    Weekly Downloads

    7

    Version

    0.0.6

    License

    ISC

    Last publish

    Collaborators

    • arvitaly