{"_id":"pakman","_rev":"83-af9cda3194f1553e4a84d4266725fdf1","name":"pakman","description":"A tool for building package managers","dist-tags":{"latest":"0.11.5"},"versions":{"0.8.0":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.0","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.0","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"08aee8573352a6e84df434e8cbfa607756614a89","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.0.tgz","integrity":"sha512-tLh5KRLyA1jU3affs3zSda4jEPx/s0qVTDWCDeLEa+l5vW9nQRLnL8DMaxMj6/+O60AT+xSBv7OUMCbKxyxqsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwIr10tbQMlxeYSUz5fx2Le4G7+WwzKVTXek47lv/+EgIgYQdD0pGcsT0AMSld4r3fgB4IqIfVDRSeFSTMantfSSk="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.1":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.1","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.1","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"eec4de64f8a6dd179596d1d0d5a98525758cef9c","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.1.tgz","integrity":"sha512-oJCTXOkAAfRe4bi2vEw2TVM2fd3XhhnnKrN+cLzXHXuBGXOk9B6YxYGDvUxElqUpDjIIqJLR6BQso88WB5ETrQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEy9TgFOgLZh0bvHejF7L03Vbs0phiHLiV+nQywP9AOoAiAA+tv5iZmxP7mb+Xv46JdBWIYiCN5vfNFXEiY42N+gkQ=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.2":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.2","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.2","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"dcf6b838b60ae2f4d992ce3d1396bef1a775584d","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.2.tgz","integrity":"sha512-VYfJ1q4L2/RoEfsESPI/MQQnyPucFQjMy+V4ovOwEh0qMWgHL7CwldBdvzBf1YSTpS6wvqoLiirVfOOkGGvWUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqsLc+QXth+RPCRoDs/foNczrysdkJZakOZ6ooUVpGVgIgc0Dms8I9lluFf83b/1/r2PqrWObAfeX7vUUiiiS7bL8="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.3":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.3","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.3","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"abe3fc37cc59c4eb1359702a347addf8fa267c75","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.3.tgz","integrity":"sha512-F7hUIckrIlC4k/kfiJshgKRbmhcUf5mqzC9LaPth72B4ua2E9Dfrfs/s89LK9xKWuYJLkv0MfmsF3x5y+n4RhQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOgN7HGyMW2bEBZQnWQL76JZQFFpRa3rUHKAqL9L8t/AiAdPRhWCpCI0H2R5oTWUIfCj2P6aWTNOHbjF0Xrurpzxw=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.4":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.4","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.4","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"9081e2b8bef50f20d4e2cec9f5f6dc7cfd624f66","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.4.tgz","integrity":"sha512-AydJVJK4kj+mjpCzHdxk5k3LB5CJqq8umMQ5p5YHDH3yRF5hXFXKjlIaDduBCJ76dUV27fGonGQrOVZ9xx6/Jg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC8RSwwm7SLjZFn083sKJiLQE5QNjhG8H5UARduSjGlVAiEA06svp1XI512tPCaAHjWrLCb74TVe4WUKyFRxCc6RP1U="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.5":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.5","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.5","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.8","_defaultsLoaded":true,"dist":{"shasum":"60b5dfa6c472e0dc3b0be11cf5af677e00ad84ad","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.5.tgz","integrity":"sha512-PMQbQ5f2SpfSODYBUUJh4RwKtcd5CwKSWVpwE6HuNL88DkzwaCWo8Vxnpk8tiyohiAOcO3fLSiZA5/3OKpCgiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGp4UGpGmOPmWBdZQYHo/AYvfFh1kqlIt07USxd78AgDAiALi1TKArXhZlLhHCuTgC+wZ4zgNqQuOvrPhPRzGeAxlA=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.6":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.6","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":"= 1.0.101","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.6","_engineSupported":true,"_npmVersion":"1.0.101","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"b5d23b008286b1575e71e29a9308a04e42e2d3b4","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.6.tgz","integrity":"sha512-4HZTJVv6Hdv9l1i2wjmkqSRv1JyHs+eGMoBm9Cd1MLFCd1w0k3kB1T4E1YO4j0HFnnzYanNCT3s7hGFC3vUdIg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5zphq+mYkJNzRBmDwlAij4hUDonh00Ue7D6EYXhkkegIgWOxhqXA0Z9vGP5bWmgzDSDD4M0Tlf4qnNMO6dKMK6HY="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.7":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.7","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">= 1.0.105","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.7","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"c47089033fd38211069dc8636dfaf2f364e9caa1","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.7.tgz","integrity":"sha512-APNVZselqMdKR2QMelsEGQIvivDcTOr2bJJGYhBmpc/QmRQLwynK4bcGnjLo+T+Yc2hOBNBg8DZi9df6tc6mhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9AEg/jcv0Pl9E0AFGHNFTthjDPNB5RzqXxP4cimkRowIhAICI9sNkeVs3DHhew07ZOybmX48wnl5e04uV+wUDjxND"}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.8":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.8","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">= 1.0.105","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.8","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"87f2e2d24862bb8ce8c85b65f6df0d629a0e7131","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.8.tgz","integrity":"sha512-m7eg2vf40oAypX6gX8+bgIhF7s2PMAJNMMBPqOLPLF++CoDrOlby8iC4u4mR2aLw4XbAL6VE/ScXLYnU+YOeKw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClPHaLsBXh611oSRXZr2DvsaSadw94IS1uNJVB0b/ORQIhANOVeSxzZBsdtg/0rY6PT5jhDwIrh+Bs7x06LCnwQSKL"}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.9":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.9","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">= 1.0.105","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.9","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"9ee3e9327fa7cb218922bcd1af730b3f61534663","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.9.tgz","integrity":"sha512-0liZJw0MF1yZbdrkuwQZ8xED7v/u6lk/wb+3oYESePTKa0M6tlOBFvYO7W25V3tHw5Zrklz/dRQgi0O2OahJ5Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyxYGTHgEq9GDi4uI7BSi0h/1lo0i8j7n77P5tqsFoSQIgdFOMvdfx/hW6gloOBnT8PT6yfELE7Y2sEWwebvf3dZs="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.8.11":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.8.11","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">= 1.0.105","Array.prototype.forEachAsync":"> 2.1","future":">= 2.1"},"devDependencies":{},"_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"_id":"pakman@0.8.11","optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"dde00bdd93614162ff2abc26371b74715053076c","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.8.11.tgz","integrity":"sha512-vqqc69QjKq7oIpu9Zpksa0F9EWHMWB0R+/x8E7+XCnXX3df37aBsdUqYXkDMNzJaWRzj8AXxlZWDexyD7gp03A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCEV/zhJ6eEoXIpp1SrHbvWNMlpTEJoaUxaJXYoEYhqZwIgB2MC1GWAivK00JWxjqbzJ6dTcda/NVPfguLfSWwiEWs="}]},"readme":"pakman\n===\n\nA collection of tools for building package managers.\n\n[`pakmanager`](http://github.com/coolaj86/node-pakmanager) is an example (but fully functional) package manager.\n\nGiven a directory with a `package.json`, `pakman` can give you back concatonated normalized scripts that will run with a custom module loader - such as in the browser.\n\nFeatures\n---\n\n  * alternate dependency lists - searches in this order:\n      * package.json.ender.dependencies\n      * package.json.enderDependencies\n      * package.json.browserDependencies\n      * package.json.dependencies\n  * modulename aliasing - normalizes local requires as 'mymodule/submodule' or 'myprovidesalias/submodule'\n      * package.json.provides\n      * package.json.name\n\nDemo\n===\n\n    git clone git://github.com/coolaj86/node-pakman.git\n    cd node-pakman/tests\n    ls ../test_modules/foomodule/\n    node test-compile-local ../test_modules/foomodule/\n\nAPI\n===\n\nIn order to make debugging (and extension) simpler,\nevery API function is in it's own file in `lib` and contains and point-and-shoot test in `test`.\n\nmodules\n---\n\nEach module object looks something like this:\n\n    {\n        \"package\": \"foomodule-browser\",           // npm name\n        \"name\": \"corge\",\n        \"pathname\": \".\",                          // relative to package.json.lib\n        \"filename\": \"corge.js\",\n        \"require\": \"../corge\",                    // how this module was required by its parent\n        \"modulepath\": \"foomodule-browser/corge\",\n        \"providespath\": \"foomodule/corge\",        // where package.json.provides is 'foomodule'\n        \"requires\": [\n            \"./foo\",\n            \"bar\"\n        ],\n\n        \"scriptSource\": \"(function () {\\n  \\\"use strict\\\";\\n\\n  require('./foo');\\n  require('bar');\\n\\n}());\\n\",\n\n        \"dependencyList\": [ ... ], // other modules, ordered (by line number)\n        \"dependencyTree\": { ... }, // other modules, mapped by modulepath\n\n        // in the case that it is known the module cannot be found\n        \"error\": {\n            \"stack\": \"Error: Couldn't find \\\"./doesnt-exist\\\"\\n    at onDirRead (./lib/get-script.js:50:18)\",\n            \"message\": \"Couldn't find \\\"./doesnt-exist\\\"\"\n        }\n    }\n\npakman\n---\n\nAll API methods are attached to the pakman object.\n\n    var pakman = require('pakman')\n      ;\n\n    console.log(Object.keys(pakman));\n\ncompile\n---\n\nGiven a module path, and a render function, compiles all of the local dependencies (pre-normalized).\n\n    var compile = require('./lib/compile').compile\n      , fs = require('fs')\n      ;\n\n    function render(module) {\n      return ''\n        + '\\n' + '// module: ' + module.modulepath + ' as ' + module.providespath\n        + '\\n' + '(function () {'\n        + '\\n' + module.scriptSource \n        + '\\n' + '}());'\n        + '\\n' + // footer'\n        + '\\n\n        ;\n    }\n\n    function writeOut(err, compiled) {\n      fs.writeFile('app.js', 'utf8');\n    }\n\n    compile('/path/to/some/module', render, writeOut);\n\nTODO: Provide package info and allow async rendering: `function render(pkg, module, fn)`\n\nmakePackageReady\n---\n\nGiven a module path, makes the module package-ready - hands you back everything you need to template the dependency with your own packag system.\n\n\n    var makePackageReady = require('./lib/make-package-ready').makePackageReady\n      ;\n\n    function handlePackageComponents(error, pkg, missing, unlisted, unused, local, pm, builtin) {\n      // error{} - couldn't read package.json, etc\n      // pkg{} - the package.json info\n      // missing[] - local files referenced, but not found\n      // unlisted[] - npm modules referenced, but not in package.json\n      // unused[] - npm modules in package.json, but not references\n      // local[] - all local modules, ordered as they would need to be listed in a browser package\n      // pm[] - all package-managed (npm) modules\n      // builtin[] - builtin modules (such as `window`, `document`, etc in the browser, or `Buffer` in node)\n    }\n\n    // the directory must contain a `package.json`\n    makePackage('/path/to/some/module', handlePackageComponents);\n\nFound in `lib/make-package-ready.js`\n\nRequires\n\n  * `sort-tree-by-types`\n  * `reduce-tree`\n  * `get-package-tree`\n  * `normalize-package-dependencies`\n  * `normalize-script-requires`\n\ngetPackageInfo\n---\n\nGiven a module path, gives the parsed `package.json` with normalized `main` and `lib` (both *will* exist).\n\n    var getPackageInfo = require('./lib/get-package-info').getPackageInfo\n      ;\n\n    function handlePackageInfo(error, pkg) {\n      // error{} - couldn't read package.json, wrong permissions, etc\n      // pkg{} - the normalized package.json info\n    }\n\n    getPackageInfo('/path/to/some/module', handlePackageInfo);\n\nAPI Call Graph\n===\n\n  * compile\n    * make-package-ready\n      * normalize-package-dependencies\n      * normalize-script-requires\n      * reduce-tree\n      * sort-tree-by-types\n        * get-npm-package-info\n          * get-package-info\n      * get-package-tree\n        * get-package-info\n        * get-module-tree\n          * get-module-leaf\n            * get-requires\n            * get-script\n              * get-file\n    * get-npm-tree\n      * get-npm-package-info\n      * get-package-info\n","maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"directories":{}},"0.11.1":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.11.1","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">=1.1.59 <2.0.0","future":">=2.3.1 <3.0.0","detective":">=0.2.1 <0.3.0","forEachAsync":">=2.2.0 <2.3.0"},"devDependencies":{},"readme":"pakman\n===\n\nA collection of tools for building package managers.\n\n[`pakmanager`](http://github.com/coolaj86/node-pakmanager) is an example (but fully functional) package manager.\n\nGiven a directory with a `package.json`, `pakman` can give you back concatonated normalized scripts that will run with a custom module loader - such as in the browser.\n\nFeatures\n---\n\n  * alternate dependency lists - searches in this order:\n      * package.json.ender.dependencies\n      * package.json.enderDependencies\n      * package.json.browserDependencies\n      * package.json.dependencies\n  * modulename aliasing - normalizes local requires as 'mymodule/submodule' or 'myprovidesalias/submodule'\n      * package.json.provides\n      * package.json.name\n\nDemo\n===\n\n    git clone git://github.com/coolaj86/node-pakman.git\n    cd node-pakman/tests\n    ls ../test_modules/foomodule/\n    node test-compile-local ../test_modules/foomodule/\n\nAPI\n===\n\nIn order to make debugging (and extension) simpler,\nevery API function is in it's own file in `lib` and contains and point-and-shoot test in `test`.\n\nmodules\n---\n\nEach module object looks something like this:\n\n    {\n        \"package\": \"foomodule-browser\",           // npm name\n        \"name\": \"corge\",\n        \"pathname\": \".\",                          // relative to package.json.lib\n        \"filename\": \"corge.js\",\n        \"require\": \"../corge\",                    // how this module was required by its parent\n        \"modulepath\": \"foomodule-browser/corge\",\n        \"providespath\": \"foomodule/corge\",        // where package.json.provides is 'foomodule'\n        \"requires\": [\n            \"./foo\",\n            \"bar\"\n        ],\n\n        \"scriptSource\": \"(function () {\\n  \\\"use strict\\\";\\n\\n  require('./foo');\\n  require('bar');\\n\\n}());\\n\",\n\n        \"dependencyList\": [ ... ], // other modules, ordered (by line number)\n        \"dependencyTree\": { ... }, // other modules, mapped by modulepath\n\n        // in the case that it is known the module cannot be found\n        \"error\": {\n            \"stack\": \"Error: Couldn't find \\\"./doesnt-exist\\\"\\n    at onDirRead (./lib/get-script.js:50:18)\",\n            \"message\": \"Couldn't find \\\"./doesnt-exist\\\"\"\n        }\n    }\n\npakman\n---\n\nAll API methods are attached to the pakman object.\n\n    var pakman = require('pakman')\n      ;\n\n    console.log(Object.keys(pakman));\n\ncompile\n---\n\nGiven a module path, and a render function, compiles all of the local dependencies (pre-normalized).\n\n    var compile = require('./lib/compile').compile\n      , fs = require('fs')\n      ;\n\n    function render(module) {\n      return ''\n        + '\\n' + '// module: ' + module.modulepath + ' as ' + module.providespath\n        + '\\n' + '(function () {'\n        + '\\n' + module.scriptSource \n        + '\\n' + '}());'\n        + '\\n' + // footer'\n        + '\\n\n        ;\n    }\n\n    function writeOut(err, compiled) {\n      fs.writeFile('app.js', 'utf8');\n    }\n\n    compile('/path/to/some/module', render, writeOut);\n\nTODO: Provide package info and allow async rendering: `function render(pkg, module, fn)`\n\nmakePackageReady\n---\n\nGiven a module path, makes the module package-ready - hands you back everything you need to template the dependency with your own packag system.\n\n\n    var makePackageReady = require('./lib/make-package-ready').makePackageReady\n      ;\n\n    function handlePackageComponents(error, pkg, missing, unlisted, unused, local, pm, builtin) {\n      // error{} - couldn't read package.json, etc\n      // pkg{} - the package.json info\n      // missing[] - local files referenced, but not found\n      // unlisted[] - npm modules referenced, but not in package.json\n      // unused[] - npm modules in package.json, but not references\n      // local[] - all local modules, ordered as they would need to be listed in a browser package\n      // pm[] - all package-managed (npm) modules\n      // builtin[] - builtin modules (such as `window`, `document`, etc in the browser, or `Buffer` in node)\n    }\n\n    // the directory must contain a `package.json`\n    makePackage('/path/to/some/module', handlePackageComponents);\n\nFound in `lib/make-package-ready.js`\n\nRequires\n\n  * `sort-tree-by-types`\n  * `reduce-tree`\n  * `get-package-tree`\n  * `normalize-package-dependencies`\n  * `normalize-script-requires`\n\ngetPackageInfo\n---\n\nGiven a module path, gives the parsed `package.json` with normalized `main` and `lib` (both *will* exist).\n\n    var getPackageInfo = require('./lib/get-package-info').getPackageInfo\n      ;\n\n    function handlePackageInfo(error, pkg) {\n      // error{} - couldn't read package.json, wrong permissions, etc\n      // pkg{} - the normalized package.json info\n    }\n\n    getPackageInfo('/path/to/some/module', handlePackageInfo);\n\nAPI Call Graph\n===\n\n  * compile\n    * make-package-ready\n      * normalize-package-dependencies\n      * normalize-script-requires\n      * reduce-tree\n      * sort-tree-by-types\n        * get-npm-package-info\n          * get-package-info\n      * get-package-tree\n        * get-package-info\n        * get-module-tree\n          * get-module-leaf\n            * get-requires\n            * get-script\n              * get-file\n    * get-npm-tree\n      * get-npm-package-info\n      * get-package-info\n","_id":"pakman@0.11.1","dist":{"shasum":"4de570ee2636dcde009290dc679618d641590212","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.11.1.tgz","integrity":"sha512-TITUqUCOMGBIUWsbAtzJq6zkReZEA8y2j6vo0HdAwX6pFUFm1eUpwx9cUhrE7DZ7P8GqAbfjNaG1bG3HdOJbbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZ2G0ZmVIGzwvdWrD5UatJNY3C0HyuxaZCbELbyvYNOAIhAKjFA4FNVygYbWmrj6jDy10Vx3kqtcbiHbk9R46N9Mfw"}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}]},"0.11.2":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.11.2","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">=1.1.59 <2.0.0","future":">=2.3.1 <3.0.0","detective":">=0.2.1 <0.3.0","forEachAsync":">=2.2.0 <2.3.0"},"devDependencies":{},"readme":"pakman\n===\n\nA collection of tools for building package managers.\n\n[`pakmanager`](http://github.com/coolaj86/node-pakmanager) is an example (but fully functional) package manager.\n\nGiven a directory with a `package.json`, `pakman` can give you back concatonated normalized scripts that will run with a custom module loader - such as in the browser.\n\nFeatures\n---\n\n  * alternate dependency lists - searches in this order:\n      * package.json.ender.dependencies\n      * package.json.enderDependencies\n      * package.json.browserDependencies\n      * package.json.dependencies\n  * modulename aliasing - normalizes local requires as 'mymodule/submodule' or 'myprovidesalias/submodule'\n      * package.json.provides\n      * package.json.name\n\nDemo\n===\n\n    git clone git://github.com/coolaj86/node-pakman.git\n    cd node-pakman/tests\n    ls ../test_modules/foomodule/\n    node test-compile-local ../test_modules/foomodule/\n\nAPI\n===\n\nIn order to make debugging (and extension) simpler,\nevery API function is in it's own file in `lib` and contains and point-and-shoot test in `test`.\n\nmodules\n---\n\nEach module object looks something like this:\n\n    {\n        \"package\": \"foomodule-browser\",           // npm name\n        \"name\": \"corge\",\n        \"pathname\": \".\",                          // relative to package.json.lib\n        \"filename\": \"corge.js\",\n        \"require\": \"../corge\",                    // how this module was required by its parent\n        \"modulepath\": \"foomodule-browser/corge\",\n        \"providespath\": \"foomodule/corge\",        // where package.json.provides is 'foomodule'\n        \"requires\": [\n            \"./foo\",\n            \"bar\"\n        ],\n\n        \"scriptSource\": \"(function () {\\n  \\\"use strict\\\";\\n\\n  require('./foo');\\n  require('bar');\\n\\n}());\\n\",\n\n        \"dependencyList\": [ ... ], // other modules, ordered (by line number)\n        \"dependencyTree\": { ... }, // other modules, mapped by modulepath\n\n        // in the case that it is known the module cannot be found\n        \"error\": {\n            \"stack\": \"Error: Couldn't find \\\"./doesnt-exist\\\"\\n    at onDirRead (./lib/get-script.js:50:18)\",\n            \"message\": \"Couldn't find \\\"./doesnt-exist\\\"\"\n        }\n    }\n\npakman\n---\n\nAll API methods are attached to the pakman object.\n\n    var pakman = require('pakman')\n      ;\n\n    console.log(Object.keys(pakman));\n\ncompile\n---\n\nGiven a module path, and a render function, compiles all of the local dependencies (pre-normalized).\n\n    var compile = require('./lib/compile').compile\n      , fs = require('fs')\n      ;\n\n    function render(module) {\n      return ''\n        + '\\n' + '// module: ' + module.modulepath + ' as ' + module.providespath\n        + '\\n' + '(function () {'\n        + '\\n' + module.scriptSource \n        + '\\n' + '}());'\n        + '\\n' + // footer'\n        + '\\n\n        ;\n    }\n\n    function writeOut(err, compiled) {\n      fs.writeFile('app.js', 'utf8');\n    }\n\n    compile('/path/to/some/module', render, writeOut);\n\nTODO: Provide package info and allow async rendering: `function render(pkg, module, fn)`\n\nmakePackageReady\n---\n\nGiven a module path, makes the module package-ready - hands you back everything you need to template the dependency with your own packag system.\n\n\n    var makePackageReady = require('./lib/make-package-ready').makePackageReady\n      ;\n\n    function handlePackageComponents(error, pkg, missing, unlisted, unused, local, pm, builtin) {\n      // error{} - couldn't read package.json, etc\n      // pkg{} - the package.json info\n      // missing[] - local files referenced, but not found\n      // unlisted[] - npm modules referenced, but not in package.json\n      // unused[] - npm modules in package.json, but not references\n      // local[] - all local modules, ordered as they would need to be listed in a browser package\n      // pm[] - all package-managed (npm) modules\n      // builtin[] - builtin modules (such as `window`, `document`, etc in the browser, or `Buffer` in node)\n    }\n\n    // the directory must contain a `package.json`\n    makePackage('/path/to/some/module', handlePackageComponents);\n\nFound in `lib/make-package-ready.js`\n\nRequires\n\n  * `sort-tree-by-types`\n  * `reduce-tree`\n  * `get-package-tree`\n  * `normalize-package-dependencies`\n  * `normalize-script-requires`\n\ngetPackageInfo\n---\n\nGiven a module path, gives the parsed `package.json` with normalized `main` and `lib` (both *will* exist).\n\n    var getPackageInfo = require('./lib/get-package-info').getPackageInfo\n      ;\n\n    function handlePackageInfo(error, pkg) {\n      // error{} - couldn't read package.json, wrong permissions, etc\n      // pkg{} - the normalized package.json info\n    }\n\n    getPackageInfo('/path/to/some/module', handlePackageInfo);\n\nAPI Call Graph\n===\n\n  * compile\n    * make-package-ready\n      * normalize-package-dependencies\n      * normalize-script-requires\n      * reduce-tree\n      * sort-tree-by-types\n        * get-npm-package-info\n          * get-package-info\n      * get-package-tree\n        * get-package-info\n        * get-module-tree\n          * get-module-leaf\n            * get-requires\n            * get-script\n              * get-file\n    * get-npm-tree\n      * get-npm-package-info\n      * get-package-info\n","_id":"pakman@0.11.2","dist":{"shasum":"7250a16004b1ee206ac9d03213f1d88cc8ac1a1b","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.11.2.tgz","integrity":"sha512-+FCTFnVeV0NUHzq8+XhcSiEXZLAd+XBW0ZyyZMglWYgIaJU96nkLS2HWIomp4pw8elWwT1HR1PWil49ZoLWTiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEOfpDgXf4Oh5OsbbhAd8iYUzkq1Cni2mOVDOkA2slX7AiAJTCYL2nRFNCX5JL51YbncRMWQYkOPUUlJVFUz+6oESg=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}]},"0.11.3":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.11.3","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">=1.1.59 <2.0.0","future":">=2.3.1 <3.0.0","detective":">=0.2.1 <0.3.0","forEachAsync":">=2.2.0 <2.3.0"},"devDependencies":{},"readme":"pakman\n===\n\nA collection of tools for building package managers.\n\n[`pakmanager`](http://github.com/coolaj86/node-pakmanager) is an example (but fully functional) package manager.\n\nGiven a directory with a `package.json`, `pakman` can give you back concatonated normalized scripts that will run with a custom module loader - such as in the browser.\n\nFeatures\n---\n\n  * alternate dependency lists - searches in this order:\n      * package.json.ender.dependencies\n      * package.json.enderDependencies\n      * package.json.browserDependencies\n      * package.json.dependencies\n  * modulename aliasing - normalizes local requires as 'mymodule/submodule' or 'myprovidesalias/submodule'\n      * package.json.provides\n      * package.json.name\n\nDemo\n===\n\n    git clone git://github.com/coolaj86/node-pakman.git\n    cd node-pakman/tests\n    ls ../test_modules/foomodule/\n    node test-compile-local ../test_modules/foomodule/\n\nAPI\n===\n\nIn order to make debugging (and extension) simpler,\nevery API function is in it's own file in `lib` and contains and point-and-shoot test in `test`.\n\nmodules\n---\n\nEach module object looks something like this:\n\n    {\n        \"package\": \"foomodule-browser\",           // npm name\n        \"name\": \"corge\",\n        \"pathname\": \".\",                          // relative to package.json.lib\n        \"filename\": \"corge.js\",\n        \"require\": \"../corge\",                    // how this module was required by its parent\n        \"modulepath\": \"foomodule-browser/corge\",\n        \"providespath\": \"foomodule/corge\",        // where package.json.provides is 'foomodule'\n        \"requires\": [\n            \"./foo\",\n            \"bar\"\n        ],\n\n        \"scriptSource\": \"(function () {\\n  \\\"use strict\\\";\\n\\n  require('./foo');\\n  require('bar');\\n\\n}());\\n\",\n\n        \"dependencyList\": [ ... ], // other modules, ordered (by line number)\n        \"dependencyTree\": { ... }, // other modules, mapped by modulepath\n\n        // in the case that it is known the module cannot be found\n        \"error\": {\n            \"stack\": \"Error: Couldn't find \\\"./doesnt-exist\\\"\\n    at onDirRead (./lib/get-script.js:50:18)\",\n            \"message\": \"Couldn't find \\\"./doesnt-exist\\\"\"\n        }\n    }\n\npakman\n---\n\nAll API methods are attached to the pakman object.\n\n    var pakman = require('pakman')\n      ;\n\n    console.log(Object.keys(pakman));\n\ncompile\n---\n\nGiven a module path, and a render function, compiles all of the local dependencies (pre-normalized).\n\n    var compile = require('./lib/compile').compile\n      , fs = require('fs')\n      ;\n\n    function render(module) {\n      return ''\n        + '\\n' + '// module: ' + module.modulepath + ' as ' + module.providespath\n        + '\\n' + '(function () {'\n        + '\\n' + module.scriptSource \n        + '\\n' + '}());'\n        + '\\n' + // footer'\n        + '\\n\n        ;\n    }\n\n    function writeOut(err, compiled) {\n      fs.writeFile('app.js', 'utf8');\n    }\n\n    compile('/path/to/some/module', render, writeOut);\n\nTODO: Provide package info and allow async rendering: `function render(pkg, module, fn)`\n\nmakePackageReady\n---\n\nGiven a module path, makes the module package-ready - hands you back everything you need to template the dependency with your own packag system.\n\n\n    var makePackageReady = require('./lib/make-package-ready').makePackageReady\n      ;\n\n    function handlePackageComponents(error, pkg, missing, unlisted, unused, local, pm, builtin) {\n      // error{} - couldn't read package.json, etc\n      // pkg{} - the package.json info\n      // missing[] - local files referenced, but not found\n      // unlisted[] - npm modules referenced, but not in package.json\n      // unused[] - npm modules in package.json, but not references\n      // local[] - all local modules, ordered as they would need to be listed in a browser package\n      // pm[] - all package-managed (npm) modules\n      // builtin[] - builtin modules (such as `window`, `document`, etc in the browser, or `Buffer` in node)\n    }\n\n    // the directory must contain a `package.json`\n    makePackage('/path/to/some/module', handlePackageComponents);\n\nFound in `lib/make-package-ready.js`\n\nRequires\n\n  * `sort-tree-by-types`\n  * `reduce-tree`\n  * `get-package-tree`\n  * `normalize-package-dependencies`\n  * `normalize-script-requires`\n\ngetPackageInfo\n---\n\nGiven a module path, gives the parsed `package.json` with normalized `main` and `lib` (both *will* exist).\n\n    var getPackageInfo = require('./lib/get-package-info').getPackageInfo\n      ;\n\n    function handlePackageInfo(error, pkg) {\n      // error{} - couldn't read package.json, wrong permissions, etc\n      // pkg{} - the normalized package.json info\n    }\n\n    getPackageInfo('/path/to/some/module', handlePackageInfo);\n\nAPI Call Graph\n===\n\n  * compile\n    * make-package-ready\n      * normalize-package-dependencies\n      * normalize-script-requires\n      * reduce-tree\n      * sort-tree-by-types\n        * get-npm-package-info\n          * get-package-info\n      * get-package-tree\n        * get-package-info\n        * get-module-tree\n          * get-module-leaf\n            * get-requires\n            * get-script\n              * get-file\n    * get-npm-tree\n      * get-npm-package-info\n      * get-package-info\n","_id":"pakman@0.11.3","dist":{"shasum":"34c1fb795d400079fbf95ea15b8e775844a95208","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.11.3.tgz","integrity":"sha512-56vp4ypkt8MPf7Mm0mRxmmc4HP6r7cHL7bfrenIm/Tf2A0vW4jOxqv6lk7R/eMg5BvbS3NxC4VzvzNyv9x7eqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpNUM0f8/Ivl18Q+GnKCKjjI1LM1xv1QwePn1nJASpBAiEAu5x77zB7ZY2k7l+PFxkKbh0ncwkR6tobvmwjwE6WtLQ="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}]},"0.11.4":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.11.4","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">=1.1.59 <2.0.0","future":">=2.3.1 <3.0.0","detective":">=0.2.1 <0.3.0","forEachAsync":">=2.2.0 <2.3.0"},"devDependencies":{},"readme":"pakman\n===\n\nA collection of tools for building package managers.\n\n[`pakmanager`](http://github.com/coolaj86/node-pakmanager) is an example (but fully functional) package manager.\n\nGiven a directory with a `package.json`, `pakman` can give you back concatonated normalized scripts that will run with a custom module loader - such as in the browser.\n\nFeatures\n---\n\n  * alternate dependency lists - searches in this order:\n      * package.json.ender.dependencies\n      * package.json.enderDependencies\n      * package.json.browserDependencies\n      * package.json.dependencies\n  * modulename aliasing - normalizes local requires as 'mymodule/submodule' or 'myprovidesalias/submodule'\n      * package.json.provides\n      * package.json.name\n\nDemo\n===\n\n    git clone git://github.com/coolaj86/node-pakman.git\n    cd node-pakman/tests\n    ls ../test_modules/foomodule/\n    node test-compile-local ../test_modules/foomodule/\n\nAPI\n===\n\nIn order to make debugging (and extension) simpler,\nevery API function is in it's own file in `lib` and contains and point-and-shoot test in `test`.\n\nmodules\n---\n\nEach module object looks something like this:\n\n    {\n        \"package\": \"foomodule-browser\",           // npm name\n        \"name\": \"corge\",\n        \"pathname\": \".\",                          // relative to package.json.lib\n        \"filename\": \"corge.js\",\n        \"require\": \"../corge\",                    // how this module was required by its parent\n        \"modulepath\": \"foomodule-browser/corge\",\n        \"providespath\": \"foomodule/corge\",        // where package.json.provides is 'foomodule'\n        \"requires\": [\n            \"./foo\",\n            \"bar\"\n        ],\n\n        \"scriptSource\": \"(function () {\\n  \\\"use strict\\\";\\n\\n  require('./foo');\\n  require('bar');\\n\\n}());\\n\",\n\n        \"dependencyList\": [ ... ], // other modules, ordered (by line number)\n        \"dependencyTree\": { ... }, // other modules, mapped by modulepath\n\n        // in the case that it is known the module cannot be found\n        \"error\": {\n            \"stack\": \"Error: Couldn't find \\\"./doesnt-exist\\\"\\n    at onDirRead (./lib/get-script.js:50:18)\",\n            \"message\": \"Couldn't find \\\"./doesnt-exist\\\"\"\n        }\n    }\n\npakman\n---\n\nAll API methods are attached to the pakman object.\n\n    var pakman = require('pakman')\n      ;\n\n    console.log(Object.keys(pakman));\n\ncompile\n---\n\nGiven a module path, and a render function, compiles all of the local dependencies (pre-normalized).\n\n    var compile = require('./lib/compile').compile\n      , fs = require('fs')\n      ;\n\n    function render(module) {\n      return ''\n        + '\\n' + '// module: ' + module.modulepath + ' as ' + module.providespath\n        + '\\n' + '(function () {'\n        + '\\n' + module.scriptSource \n        + '\\n' + '}());'\n        + '\\n' + // footer'\n        + '\\n\n        ;\n    }\n\n    function writeOut(err, compiled) {\n      fs.writeFile('app.js', 'utf8');\n    }\n\n    compile('/path/to/some/module', render, writeOut);\n\nTODO: Provide package info and allow async rendering: `function render(pkg, module, fn)`\n\nmakePackageReady\n---\n\nGiven a module path, makes the module package-ready - hands you back everything you need to template the dependency with your own packag system.\n\n\n    var makePackageReady = require('./lib/make-package-ready').makePackageReady\n      ;\n\n    function handlePackageComponents(error, pkg, missing, unlisted, unused, local, pm, builtin) {\n      // error{} - couldn't read package.json, etc\n      // pkg{} - the package.json info\n      // missing[] - local files referenced, but not found\n      // unlisted[] - npm modules referenced, but not in package.json\n      // unused[] - npm modules in package.json, but not references\n      // local[] - all local modules, ordered as they would need to be listed in a browser package\n      // pm[] - all package-managed (npm) modules\n      // builtin[] - builtin modules (such as `window`, `document`, etc in the browser, or `Buffer` in node)\n    }\n\n    // the directory must contain a `package.json`\n    makePackage('/path/to/some/module', handlePackageComponents);\n\nFound in `lib/make-package-ready.js`\n\nRequires\n\n  * `sort-tree-by-types`\n  * `reduce-tree`\n  * `get-package-tree`\n  * `normalize-package-dependencies`\n  * `normalize-script-requires`\n\ngetPackageInfo\n---\n\nGiven a module path, gives the parsed `package.json` with normalized `main` and `lib` (both *will* exist).\n\n    var getPackageInfo = require('./lib/get-package-info').getPackageInfo\n      ;\n\n    function handlePackageInfo(error, pkg) {\n      // error{} - couldn't read package.json, wrong permissions, etc\n      // pkg{} - the normalized package.json info\n    }\n\n    getPackageInfo('/path/to/some/module', handlePackageInfo);\n\nAPI Call Graph\n===\n\n  * compile\n    * make-package-ready\n      * normalize-package-dependencies\n      * normalize-script-requires\n      * reduce-tree\n      * sort-tree-by-types\n        * get-npm-package-info\n          * get-package-info\n      * get-package-tree\n        * get-package-info\n        * get-module-tree\n          * get-module-leaf\n            * get-requires\n            * get-script\n              * get-file\n    * get-npm-tree\n      * get-npm-package-info\n      * get-package-info\n","_id":"pakman@0.11.4","dist":{"shasum":"15ed04ee473bf16467e59ba914412c5f2c8e0374","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.11.4.tgz","integrity":"sha512-N/fbSpelt7Hf+FxoHQNLhdLotcXLRBRx32oXCTwZZgJpaHv63FwQsVPudUQRLvVWms4/L7NnlaQxqmX090aGNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDX6P+dAGf5fJN19JAtlMvp9M0ku2bFMtTqyOFE3S/Y8AiBFR8LNG2b//raIG88oRjJ6V3iJOWgU+ePHSNnYoBjb6g=="}]},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}]},"0.11.5":{"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"name":"pakman","description":"A tool for building package managers","version":"0.11.5","repository":{"url":"git://github.com/coolaj86/node-pakman.git"},"main":"lib/index","engines":{"node":">= v0.2.0"},"dependencies":{"npm":">=1.1.59 <2.0.0","future":">=2.3.1 <3.0.0","detective":">=0.2.1 <0.3.0","forEachAsync":">=2.2.0 <2.3.0"},"devDependencies":{},"readme":"pakman\n===\n\nA collection of tools for building package managers.\n\n[`pakmanager`](http://github.com/coolaj86/node-pakmanager) is an example (but fully functional) package manager.\n\nGiven a directory with a `package.json`, `pakman` can give you back concatonated normalized scripts that will run with a custom module loader - such as in the browser.\n\nFeatures\n---\n\n  * alternate dependency lists - searches in this order:\n      * package.json.ender.dependencies\n      * package.json.enderDependencies\n      * package.json.browserDependencies\n      * package.json.dependencies\n  * modulename aliasing - normalizes local requires as 'mymodule/submodule' or 'myprovidesalias/submodule'\n      * package.json.provides\n      * package.json.name\n\nDemo\n===\n\n    git clone git://github.com/coolaj86/node-pakman.git\n    cd node-pakman/tests\n    ls ../test_modules/foomodule/\n    node test-compile-local ../test_modules/foomodule/\n\nAPI\n===\n\nIn order to make debugging (and extension) simpler,\nevery API function is in it's own file in `lib` and contains and point-and-shoot test in `test`.\n\nmodules\n---\n\nEach module object looks something like this:\n\n    {\n        \"package\": \"foomodule-browser\",           // npm name\n        \"name\": \"corge\",\n        \"pathname\": \".\",                          // relative to package.json.lib\n        \"filename\": \"corge.js\",\n        \"require\": \"../corge\",                    // how this module was required by its parent\n        \"modulepath\": \"foomodule-browser/corge\",\n        \"providespath\": \"foomodule/corge\",        // where package.json.provides is 'foomodule'\n        \"requires\": [\n            \"./foo\",\n            \"bar\"\n        ],\n\n        \"scriptSource\": \"(function () {\\n  \\\"use strict\\\";\\n\\n  require('./foo');\\n  require('bar');\\n\\n}());\\n\",\n\n        \"dependencyList\": [ ... ], // other modules, ordered (by line number)\n        \"dependencyTree\": { ... }, // other modules, mapped by modulepath\n\n        // in the case that it is known the module cannot be found\n        \"error\": {\n            \"stack\": \"Error: Couldn't find \\\"./doesnt-exist\\\"\\n    at onDirRead (./lib/get-script.js:50:18)\",\n            \"message\": \"Couldn't find \\\"./doesnt-exist\\\"\"\n        }\n    }\n\npakman\n---\n\nAll API methods are attached to the pakman object.\n\n    var pakman = require('pakman')\n      ;\n\n    console.log(Object.keys(pakman));\n\ncompile\n---\n\nGiven a module path, and a render function, compiles all of the local dependencies (pre-normalized).\n\n    var compile = require('./lib/compile').compile\n      , fs = require('fs')\n      ;\n\n    function render(module) {\n      return ''\n        + '\\n' + '// module: ' + module.modulepath + ' as ' + module.providespath\n        + '\\n' + '(function () {'\n        + '\\n' + module.scriptSource \n        + '\\n' + '}());'\n        + '\\n' + // footer'\n        + '\\n\n        ;\n    }\n\n    function writeOut(err, compiled) {\n      fs.writeFile('app.js', 'utf8');\n    }\n\n    compile('/path/to/some/module', render, writeOut);\n\nTODO: Provide package info and allow async rendering: `function render(pkg, module, fn)`\n\nmakePackageReady\n---\n\nGiven a module path, makes the module package-ready - hands you back everything you need to template the dependency with your own packag system.\n\n\n    var makePackageReady = require('./lib/make-package-ready').makePackageReady\n      ;\n\n    function handlePackageComponents(error, pkg, missing, unlisted, unused, local, pm, builtin) {\n      // error{} - couldn't read package.json, etc\n      // pkg{} - the package.json info\n      // missing[] - local files referenced, but not found\n      // unlisted[] - npm modules referenced, but not in package.json\n      // unused[] - npm modules in package.json, but not references\n      // local[] - all local modules, ordered as they would need to be listed in a browser package\n      // pm[] - all package-managed (npm) modules\n      // builtin[] - builtin modules (such as `window`, `document`, etc in the browser, or `Buffer` in node)\n    }\n\n    // the directory must contain a `package.json`\n    makePackage('/path/to/some/module', handlePackageComponents);\n\nFound in `lib/make-package-ready.js`\n\nRequires\n\n  * `sort-tree-by-types`\n  * `reduce-tree`\n  * `get-package-tree`\n  * `normalize-package-dependencies`\n  * `normalize-script-requires`\n\ngetPackageInfo\n---\n\nGiven a module path, gives the parsed `package.json` with normalized `main` and `lib` (both *will* exist).\n\n    var getPackageInfo = require('./lib/get-package-info').getPackageInfo\n      ;\n\n    function handlePackageInfo(error, pkg) {\n      // error{} - couldn't read package.json, wrong permissions, etc\n      // pkg{} - the normalized package.json info\n    }\n\n    getPackageInfo('/path/to/some/module', handlePackageInfo);\n\nAPI Call Graph\n===\n\n  * compile\n    * make-package-ready\n      * normalize-package-dependencies\n      * normalize-script-requires\n      * reduce-tree\n      * sort-tree-by-types\n        * get-npm-package-info\n          * get-package-info\n      * get-package-tree\n        * get-package-info\n        * get-module-tree\n          * get-module-leaf\n            * get-requires\n            * get-script\n              * get-file\n    * get-npm-tree\n      * get-npm-package-info\n      * get-package-info\n","_id":"pakman@0.11.5","dist":{"shasum":"6452fd1d65aefac1c8f2e381a5aff6023e3dd61b","tarball":"https://registry.npmjs.org/pakman/-/pakman-0.11.5.tgz","integrity":"sha512-XsQOhxLOVaz5zBfslSgHBnyWK1/qZwSpuiGMW3d4zShpX7TQYtY1h5BlnJp6+PvaoFb7VKFn9WgMeKooZHVl+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDr6LBknYSHm9DLF1njH8tbQsLnIiGeERhPguG1rNWhwAiEAx/a71CEPBgiBl0rjtYd+XiHt9dwkV9BeE9Jd6y76pb4="}]},"_npmVersion":"1.1.63","_npmUser":{"name":"coolaj86","email":"coolaj86@gmail.com"},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}]}},"maintainers":[{"name":"coolaj86","email":"coolaj86@gmail.com"}],"time":{"modified":"2022-06-23T08:23:11.609Z","created":"2011-10-25T00:11:23.927Z","0.8.0":"2011-10-25T00:11:24.523Z","0.8.1":"2011-10-25T06:54:42.778Z","0.8.2":"2011-10-27T20:40:17.442Z","0.8.3":"2011-10-27T21:04:58.107Z","0.8.4":"2011-10-28T23:12:58.920Z","0.8.5":"2011-10-28T23:52:04.468Z","0.8.6":"2011-11-11T07:22:24.742Z","0.8.7":"2011-11-24T23:24:05.652Z","0.8.8":"2011-12-22T16:49:28.083Z","0.8.9":"2011-12-22T18:51:24.435Z","0.8.10":"2012-05-30T18:27:01.505Z","0.8.11":"2012-05-30T19:07:25.879Z","0.11.0":"2012-10-03T15:46:36.437Z","0.11.1":"2012-10-03T20:01:11.887Z","0.11.2":"2012-10-15T19:00:53.433Z","0.11.3":"2012-10-15T20:53:30.160Z","0.11.4":"2012-10-18T21:43:21.454Z","0.11.5":"2012-11-16T04:15:36.361Z"},"author":{"name":"AJ ONeal","email":"coolaj86@gmail.com","url":"http://coolaj86.info"},"repository":{"url":"git://github.com/coolaj86/node-pakman.git"}}