Ever since i heard of Sprockets on Twitter i wanted to use it in my apps. Unfortunatly i am not into Ruby.
Sprockets is a Ruby library that preprocesses and concatenates JavaScript source files. It takes any number of source files and preprocesses them line-by-line in order to build a single concatenation. – getsprockets.org
I wanted to port it to PHP or find clever ways to use it in CakePHP (shell?). But before you start something like this you should check if there isn’t already a project and so i found PHPSprockets from Stuart Loxton. PHP Sprocket is a port of Sprockets. Cool.. so the meat of sprockets is already available :)
PHP Sprockets currently acts as a transparent proxy as default and caches results. Because of this you do not have to initialize any classes in your app and sprocket stays separate.
Thanks to GitHub i just forked the project and began pimping Stuarts class.
Here are the major differences from the orignal port:
I also added a demo and there is more info about my rewrite in the repo readme.
Enjoy! – http://github.com/m3nt0r/php-sprockets
http://j.mp/cmhcDV)">
