Jam - JavaScript package management for the browser

thechangelog:

Caolan McMahon, the creator of Async, has released a new project called Jam. After using this project for a short while, I can say this project has huge potential. It is a package management tool that allows you to install, use and compile (minify) JavaScript libraries. Jam is a browser-focused project that uses RequireJS (AMD Modules) to load your website’s requirements.

Installation is simple:

npm install -g jamjs 

Likewise, installing libraries is easy:

jam install jquery 

Finally, you use the RequireJS to include the libraries:

<script src="jam/require.js"></script> <script> require(['query'], function($){ console.log("jQuery loaded!"); }); </script> 

One of the coolest features is the compilation, which will package all (optionally a specific set) of your libraries with RequireJS and allow you to load the optimized library as one optimized file.

jam compile jam/compiled.min.js 

Then include compiled.min.js instead of require.js, the rest works like before:

<script src="jam/compiled.min.js"></script> <script> require(['query'], function($){ console.log("optimized jQuery loaded!"); }); </script> 

If you have a library you would like added as a package, feel free to fork the project and add it in. If, in the process, you run into conflicts or issues with NPM’s package.json, Caolan wants to hear about it!

Head on over to the project page or browse the source on GitHub.

Source: thechangelog
  1. jsdavo reblogged this from thechangelog
  2. mowglibcn reblogged this from thechangelog
  3. jcolorador reblogged this from thechangelog
  4. scriptsht reblogged this from thechangelog
  5. bxlab reblogged this from thechangelog
  6. sebasmagri reblogged this from thechangelog
  7. hiqus reblogged this from thechangelog
  8. nicodp reblogged this from thechangelog
  9. andrewpthorp reblogged this from thechangelog
  10. thechangelog posted this