{"_id":"packpath","_rev":"291706","name":"packpath","description":"Find the path(s) package.json.","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"jp","email":"j.p@hotmail.com"}],"time":{"modified":"2021-06-03T18:51:48.000Z","created":"2012-08-02T16:50:38.430Z","0.1.0":"2013-01-29T15:52:00.452Z","0.0.1":"2012-08-02T16:50:38.430Z"},"users":{"scottfreecode":true},"author":{"name":"JP Richardson","email":"jprichardson@gmail.com"},"repository":{"type":"git","url":"https://github.com/jprichardson/node-packpath"},"versions":{"0.1.0":{"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","size":2723,"noattachment":false,"key":"/packpath/-/packpath-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/packpath/download/packpath-0.1.0.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"jp","email":"jprichardson@gmail.com"},"maintainers":[{"name":"jp","email":"j.p@hotmail.com"}],"directories":{},"publish_time":1359474720452,"_cnpm_publish_time":1359474720452,"_hasShrinkwrap":false},"0.0.1":{"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","size":2505,"noattachment":false,"key":"/packpath/-/packpath-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/packpath/download/packpath-0.0.1.tgz"},"maintainers":[{"name":"jp","email":"j.p@hotmail.com"}],"directories":{},"publish_time":1343926238430,"_cnpm_publish_time":1343926238430,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":["https://github.com/jprichardson/node-packpath"]}