fetchjs
v0.0.3
Published
Get local copies of client side JS libraries
Downloads
7
Readme
Introduction
If you're like me and like to have local copies of your client side javascript files, you'd like fetchjs.
Fetchjs makes it trivial to download and setup the latest versions of client side libraries.
Usage
To install fetchjs just do
npm install -g fetchjsThis will make the fetchjs command available to you. You can now initialize the fetchjs repo.
fetchjs initThis may take a while depending on your internet connection, this command essentially clones the cdnjs github repo. At any time(or rather often) you may update the repo by issuing the update command:
fetchjs updateRunning fetchjs by itself will print details of supported commands.
You need to specify the operation
init Initialize repo (required)
update Update repo (do this once in a while)
search <pattern> Search for packages matching a certain name
get <package> Get the latest version of the package and dump it to consoleYou can search for availability of certain packages, pattern is just a regex.
To get contents of a package just do:
fetchjs get jqueryThis will dump the entire contents of the jquery.min.js file to your console, you can easily redirect this to a file in your project.
fetchjs get jquery > public/js/jquery.jsAnd there you have it!
Stay tuned! More exciting stuff coming soon!
