Skip to content
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

Request enhancement for the generator #2

Open
Rowadz opened this issue Sep 28, 2020 · 1 comment
Open

Request enhancement for the generator #2

Rowadz opened this issue Sep 28, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Rowadz
Copy link
Owner

Rowadz commented Sep 28, 2020

this file erela.cli.ts is just a simple typescript code that uses inquirer and some built-in node modules to ask the user some questions and generate some files ( controller - service - entity )

notes

  • to run this script run the following command on the root directory in the terminal npm run erela ( I know that you can run it manually but this command saves you a lot of hassle and downloading stuff )

when the user answers everything the CLI will take one of the files in the templates directory and replace the __NAME__ and some other stuff (you can read the code)

But I think using a library will shorten the code and make it more scalable to generate more stuff in the future.

So I think switching to a library will do that and I recommend that you use plopjs, however, feel free to use any library you find I just liked this one

good things we can have using plopjs

  • plopjs can give us a lot of customization and shortcuts for example running npm run erela controller will immediately ask the user about the controller name

  • plopjs uses handlebarsjs for the templates now I'm using .txt files with VAR token to replace :) and handlebarsjs is more scalable

  • you can learn about it here

still, if you find a better library feel free to use it.

when you write the code just create a new branch push it then create a PR into master

plz refer the read.me if you are wondering about something or just talk with me

happy coding

@Rowadz Rowadz added the enhancement New feature or request label Sep 28, 2020
@Rowadz Rowadz added this to the version 1 milestone Sep 28, 2020
@Rowadz
Copy link
Owner Author

Rowadz commented Sep 28, 2020

plz install tslint in your text editor so it can read the tslint.json and guide you throw the mess ( tslint.json is the current convection for writing code in Erela )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants