Closed dhruvkb closed 1 year ago
Hey @dhruvkb, thanks for taking the time to create this PR!
I wanted to add support for templates for a while (https://github.com/BetaHuhn/repo-file-sync-action/discussions/204) but never had the time to work on it so far.
Any specific reasons for going with Nunjucks as the template engine instead of others like mustache, Handlebars or one of the many others?
To be honest, it was largely a subjective choice. I come from a Python background where Jinja is like the gold standard so Nunjucks made sense. If you have a strong preference for an alternative template engine, I think it'll be a small change and I'll be happy to update the PR.
The other alternative I considered was Pug but that seemed very specifically aimed for HTML templates.
@BetaHuhn is something needed from my end to get this PR merged? We'd like to use templates in our repos so we're eagerly looking forward to a release that includes this feature.
To be honest, it was largely a subjective choice. I come from a Python background where Jinja is like the gold standard so Nunjucks made sense. If you have a strong preference for an alternative template engine...
Makes sense. No strong opinions on my side, was just curious :)
Is something needed from my end to get this PR merged?
@dhruvkb No, was just too busy to actually review the changes. Will take a look now.
:tada: This PR is included in version 1.18.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Sometimes a single file must be synced to different repositories with small differences. This PR allows files to be marked as templates which are then rendered using Nunjucks instead of simply being copied over as-is.