Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

resolve-module-path

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

install

npm i resolve-module-path

Downloadsweekly downloads

5

version

0.0.6

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability