Skip to content

lite-js/module-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

module-path

npm version Build Status

locate the path of an installed node module

install

$ npm install @lite-js/module-path [-g]

API

const modulePath = require('@lite-js/module-path')

// global module
console.log(modulePath('zfinder'))
// => /Users/liangwensen/.nvm/versions/node/v4.2.2/lib/node_modules/.zfinder_npminstall/zfinder/0.2.9/zfinder/lib/index.js

// local module
console.log(modulePath('mocha'))
// => /Users/liangwensen/repo/leungwensen/module-path/node_modules/.npminstall/mocha/3.4.2/mocha/index.js

// core module
console.log(modulePath('path'))
// => path

CLI

$ npm install @lite-js/module-path -g
$ module-path zfinder
# /Users/liangwensen/.nvm/versions/node/v4.2.2/lib/node_modules/.zfinder_npminstall/zfinder/0.2.9/zfinder/lib/index.js
$ module-path npm
# /Users/liangwensen/.nvm/versions/node/v4.2.2/lib/node_modules/npm/lib/npm.js

Thanks to

Releases

No releases published

Packages

No packages published