{"name":"packpath","version":"0.1.0","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","find"],"author":{"name":"JP Richardson","email":"jprichardson@gmail.com"},"licenses":[{"type":"MIT","url":"http://github.com/jprichardson/node-packpath/raw/master/LICENSE"}],"devDepdencies":{"mocha":"*"},"main":"./lib/packpath","scripts":{"test":"mocha test"},"devDependencies":{"testutil":"~0.4.0"},"_id":"packpath@0.1.0","dist":{"shasum":"a521534222dfeaa9c612ef0c640ec399149ecdd8","tarball":"http://registry-npm.ywwl.com/packpath/download/packpath-0.1.0.tgz","integrity":"sha512-6E+ncOyZ83bDW/3TFriKpz8XENvpG56Yt3di3KjyYaJV5deZ4o0OmwvFThHrscugBfGQqTWOGnf2IoEecJewuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAon+mf0Zi7/kdDuyegk+NvHHmYjuqAdHfy/1gPkTiOVAiEA+toAc+O43hiryDD8y2XR9AemZAcyDOiIF+9bIPykNSo="}],"size":2723,"noattachment":false,"key":"/packpath/-/packpath-0.1.0.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"jp","email":"jprichardson@gmail.com"},"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":1359474720452,"_cnpm_publish_time":1359474720452,"dist-tags":{"latest":"0.1.0"}}