Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sprockets is a frontend build tool. It works basically the same way.

The main difference between sprockets and grunt / lineman / broccoli, is that sprockets do not watch files. It's a web application that compile your assets on the fly[0][1] when you need them.

So it's lazy, and blocking. Meaning that you do not have to guess if your assets have been recompiled yet. Your browser just ask for them, and get them as soon as they are ready.

[0] In development mode of course [1] In fact it cache the output, but whatever.



Bingo. But keep in mind that Sprockets doesn't have to be used just as a Rack server to compile on the fly, it can also be used to precompile to static files. In fact, you could then combine it with something like the watcher gem, and you now have automatic precompiling whenever you save your source files. In fact, there's the guard-sprockets gem which does all this for you [1].

[1] https://github.com/pferdefleisch/guard-sprockets




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: