Last active
May 10, 2016 11:39
-
-
Save kvz/a566ba3be4a3faf7d6e6 to your computer and use it in GitHub Desktop.
Proposal for (partial) template includes
This file contains hidden or 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
| { | |
| include_template: "a", // <-- full template, used as a base | |
| is_video: { | |
| use: ":original", | |
| robot: "/file/filter", | |
| accepts: [ | |
| [ | |
| "${file.mime}", | |
| "regex", | |
| "video" | |
| ], | |
| ], | |
| error_on_decline:false | |
| }, | |
| is_image: { | |
| use: ":original", | |
| robot: "/file/filter", | |
| accepts: [ | |
| [ | |
| "${file.mime}", | |
| "regex", | |
| "image", | |
| ], | |
| ], | |
| error_on_decline: false | |
| }, | |
| include_template_partial: "c.video_encode", // <-- include just 1 named step | |
| video_encode: { | |
| use: "is_video", // <-- override its `use` parameter to connect the chain | |
| }, | |
| include_template_partial: "c.image_resize", | |
| image_resize: { | |
| use: "is_image", | |
| }, | |
| store: { // <-- was already inside template "a" | |
| // <-- override its `use` parameter to connect the chain | |
| use: ["video_encode", "image_resize", ":original"], | |
| }, | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Prinzhorn I see where the two diverge now, your approach is interesting and easier to add indeed. I'll discuss with the team if I'm not overlooking anything.