Last active
August 29, 2015 14:05
-
-
Save fgarcia/2cc553132a07a07914e0 to your computer and use it in GitHub Desktop.
A good pipeline?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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