loreanvictor / tmplr

Automate Code Scaffolding
MIT License
26 stars 0 forks source link

Add support for using reusable recipes #19

Closed loreanvictor closed 1 year ago

loreanvictor commented 1 year ago

It'd be nice to use reusable recipes directly (outside of some other recipe) too. For example, one could use this recipe to add a GitHub workflow for auto-publishing their package.

A use command perhaps would be nice. It could emulate what use command does inside of recipes: create a temporary folder, clone the recipe into the temp folder, run it, and clean the temp folder.

tmplr use loreanvictor/npm-autopublish-recipe

Implementation should also be rather straightforward, since a virtual recipe could do the trick. It should also support working directories.

loreanvictor commented 1 year ago

Also testing reusable recipes isn't easy at the moment. Perhaps a tmplr preview:use command would help with this.