jondot / hygen

The simple, fast, and scalable code generator that lives in your project.
http://www.hygen.io
MIT License
5.57k stars 252 forks source link

how to get the value of prompts entered for one set of templates into another templates for further use? #399

Open DIVANSHMAHAJAN opened 2 years ago

DIVANSHMAHAJAN commented 2 years ago

Suppose we have 2 templates and one of them is for creating the main structure of the project including all folders and files and requires a name field . Now our 2nd template is especially for creating files in one folder of the above created project and also injects some template code into the previously created folder's file (for which name is reqd as well in the to field ). Is there a possible solution for this scenario? Also does regex work in injection template eg: to: app/*.js (which helps to push to js file inside appp folder assuming only 1js file is present ) Currently this gives error and exact name of js file is reqd.