Is it possible to copy a directory of *.tt files without executing template engine. I'd like to improve my rails templates and add custom scaffold templates (views, controllers and specs), but every time I use directory method
directory "lib/templates", force: true
I see an exception when thor tries to start template engine for those files. How to just copy my directory?
I think the simplest and safest option is to glob and
copy_fileas described ^ by @engineersmnky.But, there is a way to use
directoryand not execute templates. The only thing that stands in the way is this constant:Normally, you shouldn't change constants, but it was asking for it by not being frozen. What's the worst that can happentm:
and a little test:
If the above method is too hacky, here is another one, wasn't as simple as I thought, just had to get
source_rootanddestination_rootright.