Allow to change the default `_templates` directory on `hygen init`
lktslionel opened this issue · comments
I want to be able to change the default template directory name _templates
by whatever I want.
I like to use dotted directory (Eg: .templates) for things not directly related to the core of my project. So, I will be great if could set the parameter --tmpls-dir
when initializing the hygen inot my project.
So, intializing the hygen with a custom templates dir will be done as follows:
hygen init self --tmpls-dir .templates
The command below will:
- Initialize all templates inside
.templates
directory instead of the default_templates
dir. - Create a .hygen.js file settings the new templates dir as default for templated discovery with contents:
module.exports = {
templates: `${__dirname}/.templates`
}
Let me know if it make sens, so that I can contribute.
I'm new to the project, that's why any guidance on the parts of the code to change, will be helpful.
It looks like it is the setup
ops that is doing the init.
Thanks
This is a great idea
I would be happy to accept a PR for it
any update on this one ? :)