loreanvictor / tmplr

Automate Code Scaffolding
MIT License
26 stars 0 forks source link

Update all files in a directory #1

Closed svbackend closed 2 years ago

svbackend commented 2 years ago

Cool project overall and I'm amazed by quality of documentation, just wanted to say huge thanks for your work!

svbackend commented 2 years ago

The only feature it's lacking is "update directories", for example I have template with bunch of java/kotlin files and in all of them I would like to replace "package com.example.projectname" by "package {{ tmplr.package }}" but looks like currently I need to specify all files manually or use some sort of bash command like sed which is not multiplatform and could not work on Windows

loreanvictor commented 2 years ago

Thanks! And thats a good use case. I am in the middle of restructuring the project into smaller packages, during that change will also add glob support to update command, which should do the trick, e.g.:

update: 'src/**/*.java'
loreanvictor commented 2 years ago

The refactor is done, which means this feature is also on the latest version.