@lite-js/module-path
locate the path of an installed node module
Last updated 3 years ago by leungwensen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lite-js/module-path 
SYNC missed versions from official npm registry.

module-path(1)

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

Current Tags

  • 0.0.2                                ...           latest (3 years ago)

2 Versions

  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |