-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to provide files as part of the context #1
Comments
@amr, thanks for the suggestion! Do you have any thoughts on syntax? I have some preliminary thoughts of my own, but figured I'd ask. |
Thanks for asking! I think one DRY/KISS approach would be to support a new top-level directory e.g. "files", that would be applied/copied recursively to the output (after it is generated). |
@amr, so I had a chance to think about this some. I'll walk you through my thought process, so let me know what you think. The use case you described can almost be handled with the current system by having a template file containing a single tag like so:
However, this doesn't quite work because there is an assumption in Mustache that the files are text files. I'm thinking then that the use case above could be addressed by adding a new "template" extension/format that works something like the following:
The content of a file with extension The If I understand your approach correctly, I think an approach like what I described would be even more DRY because, for example, you wouldn't need to maintain a parallel directory hierarchy. You would also be able to place several copies of the binary file in your project template while needing only one copy in the |
That's a pretty neat solution! I think it also means that the template is self-describing. i.e. by looking at the template directory one would be able to tell what files/dirs will be in the resulting directory without having to go to the files directory and try to comprehend the result after applying the latter to the former. |
In my project I need to provide some icons as part of the context. I think it may be a good addition to groome.
The text was updated successfully, but these errors were encountered: