Skip to content

Instantly share code, notes, and snippets.

@fgarcia
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fgarcia/2cc553132a07a07914e0 to your computer and use it in GitHub Desktop.
Save fgarcia/2cc553132a07a07914e0 to your computer and use it in GitHub Desktop.
A good pipeline?
# What a normal pipeline must have
- Provide URL api 'http://.../assets/' to reach image / js / css files
- File transformation encoded in file name
style.css.sass
code.js.coffee
# Not so common features
- Ruby functions to reach asset file handler (within local filesystem. Like:
- Import files within assets... like Sass having its own @import mechanism that take file handlers
https://github.com/zenbits/pademo/blob/d8f8a23ccc65572727237afa12f59a359bce6b6e/vendors/pademo-pipeline/app/stylesheets/sassy-local.css.scss#L1
- Get external "view partials" hosted in other gems, repositories?, urls...
- Helpers to clean views
http://www.sitepoint.com/using-sinatra-helpers-to-clean-up-your-code/
- what if image file needs a imagemagic filter before being given by asset handler? Extend url API to forward parameters to custom functions?
/assets/image.png?bluelayer=yes
bind automagically to...
def asset_request(file, request)
....
return file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment