{"_id":"sources","_rev":"5-5f1743327405115585fd8af208f386ba","name":"sources","description":"fetches sources from the web","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"sources","version":"0.1.0","description":"fetches sources from the web","bin":{"sources":"./sources.js"},"dependencies":{"optimist":"*","request":"*","underscore":"*","q":"*","q-io":"*","parents":"*","unzip":"*"},"repository":{"type":"git","url":"https://github.com/jdiamond/sources.git"},"author":{"name":"Jason Diamond"},"license":"MIT","readme":"sources\n=======\n\nsources is a simple command-line tool that can fetch resources from the web and\nsave them to your local file system.\n\nIt's a poor man's package manager in that it can download and extract packages\nfor me when creating a new project.\n\nIf you prefer a real package manager, please see any of the following:\n\n- [Bower](http://twitter.github.com/bower/)\n- [Component](https://github.com/component/component)\n- [Jam](http://jamjs.org/)\n- [Volo](http://volojs.org/)\n\nThose all seem very useful, but I like being in control of exactly what files I\nadd to my projects and I don't like not being able to use a package manager\nbecause the project I need doesn't have the magic JSON file in its repository.\n\nWith sources, I can define the sources for packages on my machine. I don't have\nto wait for a project to adopt any conventions and I can select the exact files\nI need.\n\nSources are defined in a file called sources.json:\n\n    {\n        \"jquery\": \"http://code.jquery.com/jquery.js\",\n        \"bootstrap\": [\n            \"jquery\",\n            \"http://twitter.github.com/bootstrap/assets/bootstrap.zip\"\n        ],\n        \"qunit\": [\n            \"http://code.jquery.com/qunit/qunit-1.11.0.js\",\n            \"http://code.jquery.com/qunit/qunit-1.11.0.css\"\n        ]\n    }\n\nWith something like that in my current or home directory I can type:\n\n    sources bootstrap\n\nand the latest jQuery and Bootstrap files will be fetched and extracted into\nthe current directory.\n\nLater on, if I decide I need to write some tests, I can type:\n\n    sources qunit\n\nto fetch the QUnit files.\n\nThat's really all there is to it.\n\nYes, it kind of resolves dependencies for me, but only if I define those\ndependencies myself.\n\nYes, it fetches the latest versions of jQuery and Bootstrap, but only because\nURLs exist for the latest versions. If a new version of QUnit is released, I\nwon't get that because I don't know of a URL for the latest version of QUnit.\n\nFinding Sources\n---------------\n\nThe sources for packages are defined in files named sources.json.\n\nsources will look in the following locations for sources.json files:\n\n- the current directory\n- all parent directories of the current directory\n- the home directory\n- the sources script's directory\n\nLocations higher on that list override locations lower on that list.\n\nThe contents of sources.json files are a JSON object like this:\n\n    {\n        \"jquery\": \"http://code.jquery.com/jquery.js\",\n        \"bootstrap\": [\n            \"jquery\",\n            \"http://twitter.github.com/bootstrap/assets/bootstrap.zip\"\n        ],\n        \"qunit\": [\n            \"http://code.jquery.com/qunit/qunit-1.11.0.js\",\n            \"http://code.jquery.com/qunit/qunit-1.11.0.css\"\n        ]\n    }\n\nThe keys in those objects are the names of the packages as I've defined them.\n\nThe values can be URLs or arrays of URLs to fetch from.\n\nIf a URL references an archive, that archive is extracted into the current\ndirectory and then the archive is deleted.\n\nIf a URL is the name of another package, that other package is fetched, too.\n\nTODO:\n\n- write to lib folder?\n- look for sources.json inside lib folders, too?\n- look for lib folder up path?\n- caching?\n- other archive formats?\n- extract specific files from archives? (to exclude minified files, docs, tests, etc)\n\n    \"bootstrap\": [\n        \"jquery\",\n        {\n            \"http://twitter.github.com/bootstrap/assets/bootstrap.zip\": [\n                \"css/bootstrap.css\",\n                \"css/bootstrap-responsive.css\",\n                \"img/*\",\n                \"js/bootstrap.js\"\n            ]\n        }\n    ]\n\n- rename files?\n\n    \"qunit\": [\n        \"http://code.jquery.com/qunit/qunit-1.11.0.js => qunit.js\",\n        \"http://code.jquery.com/qunit/qunit-1.11.0.css => qunit.css\"\n    ]\n","readmeFilename":"README.md","_id":"sources@0.1.0","dist":{"shasum":"e4c9cec20b5cc19843b6f8c679005cac68d12794","tarball":"https://registry.npmjs.org/sources/-/sources-0.1.0.tgz","integrity":"sha512-WO/CDRdjJj3rQBDu7T9UCM7tCsAguZs6xkcKc9M9YRdNoselekeDwKiX+bE9GgNbyxVhApJ4eaSqMAOzQtw1pA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEMRmDYK897jTY15df+wfEO8y+A4w2l0IKwzJ69zi9ogIhAK31l7KXDyYtMYEFoFCLtrmqZLVnpBDcTjKL8McPEvMa"}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"jdiamond","email":"jason@diamond.name"},"maintainers":[{"name":"jdiamond","email":"jason@diamond.name"}]}},"readme":"sources\n=======\n\nsources is a simple command-line tool that can fetch resources from the web and\nsave them to your local file system.\n\nIt's a poor man's package manager in that it can download and extract packages\nfor me when creating a new project.\n\nIf you prefer a real package manager, please see any of the following:\n\n- [Bower](http://twitter.github.com/bower/)\n- [Component](https://github.com/component/component)\n- [Jam](http://jamjs.org/)\n- [Volo](http://volojs.org/)\n\nThose all seem very useful, but I like being in control of exactly what files I\nadd to my projects and I don't like not being able to use a package manager\nbecause the project I need doesn't have the magic JSON file in its repository.\n\nWith sources, I can define the sources for packages on my machine. I don't have\nto wait for a project to adopt any conventions and I can select the exact files\nI need.\n\nSources are defined in a file called sources.json:\n\n    {\n        \"jquery\": \"http://code.jquery.com/jquery.js\",\n        \"bootstrap\": [\n            \"jquery\",\n            \"http://twitter.github.com/bootstrap/assets/bootstrap.zip\"\n        ],\n        \"qunit\": [\n            \"http://code.jquery.com/qunit/qunit-1.11.0.js\",\n            \"http://code.jquery.com/qunit/qunit-1.11.0.css\"\n        ]\n    }\n\nWith something like that in my current or home directory I can type:\n\n    sources bootstrap\n\nand the latest jQuery and Bootstrap files will be fetched and extracted into\nthe current directory.\n\nLater on, if I decide I need to write some tests, I can type:\n\n    sources qunit\n\nto fetch the QUnit files.\n\nThat's really all there is to it.\n\nYes, it kind of resolves dependencies for me, but only if I define those\ndependencies myself.\n\nYes, it fetches the latest versions of jQuery and Bootstrap, but only because\nURLs exist for the latest versions. If a new version of QUnit is released, I\nwon't get that because I don't know of a URL for the latest version of QUnit.\n\nFinding Sources\n---------------\n\nThe sources for packages are defined in files named sources.json.\n\nsources will look in the following locations for sources.json files:\n\n- the current directory\n- all parent directories of the current directory\n- the home directory\n- the sources script's directory\n\nLocations higher on that list override locations lower on that list.\n\nThe contents of sources.json files are a JSON object like this:\n\n    {\n        \"jquery\": \"http://code.jquery.com/jquery.js\",\n        \"bootstrap\": [\n            \"jquery\",\n            \"http://twitter.github.com/bootstrap/assets/bootstrap.zip\"\n        ],\n        \"qunit\": [\n            \"http://code.jquery.com/qunit/qunit-1.11.0.js\",\n            \"http://code.jquery.com/qunit/qunit-1.11.0.css\"\n        ]\n    }\n\nThe keys in those objects are the names of the packages as I've defined them.\n\nThe values can be URLs or arrays of URLs to fetch from.\n\nIf a URL references an archive, that archive is extracted into the current\ndirectory and then the archive is deleted.\n\nIf a URL is the name of another package, that other package is fetched, too.\n\nTODO:\n\n- write to lib folder?\n- look for sources.json inside lib folders, too?\n- look for lib folder up path?\n- caching?\n- other archive formats?\n- extract specific files from archives? (to exclude minified files, docs, tests, etc)\n\n    \"bootstrap\": [\n        \"jquery\",\n        {\n            \"http://twitter.github.com/bootstrap/assets/bootstrap.zip\": [\n                \"css/bootstrap.css\",\n                \"css/bootstrap-responsive.css\",\n                \"img/*\",\n                \"js/bootstrap.js\"\n            ]\n        }\n    ]\n\n- rename files?\n\n    \"qunit\": [\n        \"http://code.jquery.com/qunit/qunit-1.11.0.js => qunit.js\",\n        \"http://code.jquery.com/qunit/qunit-1.11.0.css => qunit.css\"\n    ]\n","maintainers":[{"name":"jdiamond","email":"jason@diamond.name"}],"time":{"modified":"2022-06-26T22:24:54.781Z","created":"2013-04-28T21:50:29.001Z","0.1.0":"2013-04-28T21:50:30.429Z"},"author":{"name":"Jason Diamond"},"repository":{"type":"git","url":"https://github.com/jdiamond/sources.git"}}