{"name":"packpath","version":"0.0.1","description":"Find the path(s) package.json.","homepage":["https://github.com/jprichardson/node-packpath"],"repository":{"type":"git","url":"https://github.com/jprichardson/node-packpath"},"keywords":["require","package","path","resolve","package.json"],"author":{"name":"JP Richardson","email":"jprichardson@gmail.com"},"licenses":[{"type":"MIT","url":"http://github.com/jprichardson/node-packpath/raw/master/LICENSE"}],"devDepdencies":{"mocha":"1.3.x"},"main":"./lib/packpath","scripts":{"test":"mocha test"},"_id":"packpath@0.0.1","dist":{"shasum":"30fd99f436b0ca0740479119a47d44b880adfd93","tarball":"http://registry-npm.ywwl.com/packpath/download/packpath-0.0.1.tgz","integrity":"sha512-t/02eL+AnRVnu47GMzOId5asfYgzfDQhyu+Ae2nBMZLNCnRTuDyGWjiUsV0iWBZC8AAkfAn1ydklrQSFKSVMVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTm5g9DYvz70mr00aFJRgKoPOqRxqt7suMnhNbcFIbgAiBm9sF7EWCFXpZ+BlIK/1bT6rOybFZ0QcrULD6S1wjrcQ=="}],"size":2505,"noattachment":false,"key":"/packpath/-/packpath-0.0.1.tgz"},"maintainers":[{"name":"jp","email":"jprichardson@gmail.com"}],"directories":{},"readme":"Node.js - packpath\n==================\n\n`packpath` helps you to find directories that contain `package.json`.\n\n\n\nWhy?\n----\n\nThe directory with `package.json` is considered a module's base or root directory. At times, it's extremely convenient to need to know where that is.\n\nLet's say that you write a module and you hate having to `require()` your files using relative paths `../../`, etc. This is how the module `autoresolve` works. Or, let's say that you are writing a module that needs to access configuration files in an app that called require on your module. These paths can get hairy fast.\n\n\n\n\nInstallation\n------------\n\n    npm install packpath\n\n\n\nUsage\n-----\n\nFor your apps, assuming you want to access your own config files, etc.\n\napp.js:\n```javascript\nvar packpath = require('packpath');\n\n//<-- your own confile dir\nvar configDir = path.join(packpath.self(), 'config');\n```\n\nFor your modules, assuming you want to access developers' config files who \"required\" your module.\n\nmywidget.js:\n```javascript\nvar packpath = require('packpath');\n\n//the config dir of the app that called your module through require()\nvar configDir = path.join(packpath.parent(), 'config'); \n```\n\n\nLicense\n-------\n\n(MIT License)\n\nCopyright 2012, JP Richardson","publish_time":1343926238430,"_cnpm_publish_time":1343926238430,"dist-tags":{"latest":"0.1.0"}}