SmartAsset - Like AssetPackager, but smarter
SmartAsset only re-packages files that have been modified, uses Closure Compiler for javascript compression, and is framework agnostic. Easy to migrate from AssetPackager. Check it out on GitHub.
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
SmartAsset only re-packages files that have been modified, uses Closure Compiler for javascript compression, and is framework agnostic. Easy to migrate from AssetPackager. Check it out on GitHub.
Comments
Yo Winton – if you’re really going to reinvent the asset packager, please use the gems that already exist (and that people already have installed) for both the Closure Compiler and YUI Compressor:
https://github.com/sstephenson/ruby-yui-compressor
https://github.com/documentcloud/closure-compiler/
… instead of having folks download those JAR files again.
I didn’t have time to vet those projects for this iteration, but will definitely look into it for the next version. Thanks Jeremy.
This looks pretty promising, but since I’ve been using Jammit I highly doubt I’ll use anything similar to AssetPackager again.
Terellel, Jammit is certainly a great solution, and surpasses SmartAsset in many ways.
I think one should use SmartAsset if you just need basic javascript/stylesheet packaging done in a highly efficient manner. A definite advantage is that is uses information from Git to package only assets that have been modified. With AssetPackager and Jammit, the enduser is often unnecessarily downloading new packages that are the same as the ones they have already cached.
On a side note, I like easily hackable source code and Sinatra, and this project is friendly to both :). The guts are currently running at around ~240 lines.
Post a comment