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

Project generators functions need some refactoring #25

Closed
alexnm opened this issue Feb 23, 2019 · 0 comments
Closed

Project generators functions need some refactoring #25

alexnm opened this issue Feb 23, 2019 · 0 comments
Assignees
Labels
good first issue Good for newcomers refactoring Working functionality needs redo

Comments

@alexnm
Copy link
Contributor

alexnm commented Feb 23, 2019

There's a lot of duplication currently in the main functions of the project generators:
src/project-generators/react-basic/index.ts
src/project-generators/react-next/index.ts
src/project-generators/vue-basic/index.ts
src/project-generators/vue-nuxt/index.ts

Helper functions can be extracted for creating various types of files (ex: createJSfile, createCSSfile, etc.), or for creating folders (ex: createFolder) or for the dependencies merge then generator functions will be smaller.

React project generators should have priority for now, until #45 is solved, because Vue generators don't have the globals implementation yet

@alexnm alexnm added good first issue Good for newcomers refactoring Working functionality needs redo labels Feb 23, 2019
@ionutpasca ionutpasca self-assigned this Mar 26, 2019
@alexnm alexnm added this to the Beta Release - v0.5 milestone Mar 28, 2019
ionutpasca pushed a commit that referenced this issue Mar 29, 2019
ionutpasca pushed a commit that referenced this issue Mar 29, 2019
ionutpasca pushed a commit that referenced this issue Mar 29, 2019
ionutpasca pushed a commit that referenced this issue Mar 29, 2019
alexnm pushed a commit that referenced this issue Mar 29, 2019
* Refactored react-basic project generator

* refactor: Refactored the react-next project generator

#25

* refactor: Refactor vue-basic project generator

#25

* refactor: Refactored vue-nuxt project generator

#25

* refactor: Extracted params in an interface

#25

* refactor: Changes made after pull request

#25

* refactor: Changed a function name

#25

* refactor: Changes after pull request

#25

* refactor: Fixed a typo

#25
@alexnm alexnm closed this as completed Mar 29, 2019
alexnm pushed a commit that referenced this issue Apr 2, 2019
* Refactored react-basic project generator

* refactor: Refactored the react-next project generator

#25

* refactor: Refactor vue-basic project generator

#25

* refactor: Refactored vue-nuxt project generator

#25

* refactor: Extracted params in an interface

#25

* refactor: Changes made after pull request

#25

* feat(project error handling): adding validator and error handling

* test(project valdiator tests): adding test for project validator

* refactor(refactor after mr remarks): changes where skipValidation option is sent

SkipValidation option is sent from generateComponent options. Adding option to skip validation on
generate project. Adding test to check this scenario.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactoring Working functionality needs redo
Projects
None yet
Development

No branches or pull requests

2 participants