I recently discovered a github repo by @maccaw that looked very interesting: Catapult. For building prototypes of some client-side code, or as frontend asset server based on Ruby, Catapult gives you all you need. With:
catapult new <squash>
You get some fresh project structure, an index.html, a small server and some basic rake tasks to connect with a production environment. This is a bit similar to what Yeoman does, but the advantage of Catapult (for me) is that it is Ruby.
Now, some savings in typing a few ‘mkdir -p /public/js/libs’, copying an index.html, and providing a shortcut for running a Rack server might sound not as a big deal. However, it sets a nice background for something great: Managing application dependencies, and especially, client-side application dependencies.
When you start with a client-side application from scratch, you need to get jQuery, Underscore.js, maybe Backbone.js, Marionette.js, Handelbars.js, and some other library here and there, and it is easy to lose the overview where to get your libs, and what version to import. In Ruby land, you only need to say ‘bundle install’ and you are ready to go.
It is here where I realized (within a discussion at Github issues) what another very interesting tool is about: ‘bower’. Bower is a Node.js based dependency management solution. It reads a definition of dependencies from a bower.json file, and when you run ‘bower install’ your dependencies are fetched. It’s basically inserting the DNA into an empty application: Cloning the project’s into your local machine, and copy it from there into the application.