codeBelt / generate-template-files

A simple generator to create custom template files for any application
https://medium.com/@robertsavian/generate-template-files-with-ease-19b320615359
MIT License
209 stars 31 forks source link

Allow user to use the command line to generate template files #40

Closed codeBelt closed 4 years ago

codeBelt commented 4 years ago

Now you can use the command line to generate template files. https://github.com/codeBelt/generate-template-files/issues/31

node ./tools/generate.js angular-ngrx-store __name__=some-name __model__=some-other-name --outputpath=./src/here --overwrite

Here's the break down

Try it out and let me know if you have any feedback. I will publish this probably tomorrow after I get the README updated.

Thanks @knona for your on helping me with this.

@dennbagas @CGeorges

krambono commented 4 years ago

I'm glad I could help :) I just fount out the yargs library. What a great tool !

krambono commented 4 years ago

Just a detail: you don't check that all string replacers are passed as arguments. I think it would be better if we can inform the user that something is missing.

seidhkona commented 3 years ago

Is it possible to run node ./tools/generate.js create-reduce-action and then follow prompts for file name, etc? So far, passing option name in the command line doesn't work for me at all (I'm still being prompted with "What do you want to generate?" question. I want to call something like npm run gen spec similar to ng generate class command and then provide input for the file name. Thanks!