-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate template via command line #22
Comments
It would be really nice to have this working, I guess using commander.js as interface might work |
@jlcastrillon91 Yes I was so busy at work and don't have enough time to implement this. Before I was going to implement it with One thing though, I don't think they have code generator from a template w/c is what I need for this. Thoughts? |
https://cookiecutter.readthedocs.io/en/latest/ can be useful to you. I am giving in a try |
Hey @rhm-fyayc this looks good. However, This adds dependency( |
I don't see as a dependency @joshuaalpuerto, because it is not packaged together with your project. It is a tool, such as brew, visual studio code or pip (which is also in python) What you need it is a project that is going to work as your project structure, your baseline. Then, every time you need to start a new project you ask to create the new project based on that template. I have forked your project to show you, check it here https://github.com/rhm-fyayc/node-ddd-boilerplate you can try like this cookiecutter gh:rhm-fyayc/node-ddd-boilerplate |
Oh I see now what you mean. I have a different goal in mind. What I want is to generate a module inside this boilerplate. Like how react-boilerplate is doing. Since staring a new module is boilerplaty and requires you to create this files.
I can create and connect my module real fast by creating templates from those files and generate them when developer opt-in. |
I got your point. If what the developer chooses has the output in the same file, you can achieve that with cookiecutter. Example: if the developer opt-in to have a container component means to change the content of some files, that is possible. However, if this requires to create a different set of files, I think it is then not the best tool. I don't use react framework, so I don't know the impact. But as amentioned, if it just modifies the content of some files in the basic structure, you can achieve that in some minutes with cookiecuter. |
The thing about this issue is that the developer already have this boilerplate and want to generate a new module like
The way I understand cookiecutter is that it will generate this boilerplate instead of the module inside it. So thats different use-case (Please correct me).
Again my use-case is to generate module inside this boilerplate. So I want my dependencies to be the same. Am looking to implement plopjs w/c I really think the best for this. However I just don't have time yet. |
I didn't know plopjs, but it seems to cover a broader and complex range of scenarios than cookiecutter. If I understood it correctly, to achieve your use case with cookiecutter, each module (considering that can be seen as a template) would require a new repo for the template, not your project, meaning doesn't look the best tool for the job :-) |
Tried to have this feature now , please checkout the PR here #67 |
No description provided.
The text was updated successfully, but these errors were encountered: