Novelty Plastic Moustache

    module-path

    0.2.0 • Public • Published

    module-path(1)

    locate the path of an installed node module

    installation

    $ npm install module-path [-g]

    usage

    API:

    var modulePath = require('module-path');
     
    // global module
    var pathOfZFinder = 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
    var pathOfJasmine = modulePath('jasmine');
    // => /Users/liangwensen/repo/leungwensen/node-module-path/node_modules/.npminstall/jasmine/2.5.2/jasmine/lib/jasmine.js
     
    // core module
    var pathOfPath = modulePath('path');
    // => path

    CLI:

    $ npm install 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

    Install

    npm i module-path

    DownloadsWeekly Downloads

    12

    Version

    0.2.0

    License

    none

    Last publish

    Collaborators

    • leungwensen