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

Adding initial react generator #26

Merged
merged 1 commit into from Oct 12, 2019
Merged

Adding initial react generator #26

merged 1 commit into from Oct 12, 2019

Conversation

kb-commit
Copy link
Contributor

No description provided.

@kb-commit
Copy link
Contributor Author

Overall:

  1. Added initial skeleton from create react app that we can evolve from
  2. Instead of writing generator for file by file, added generator for directory, this should allow us to skip a lot of overhead in code
  3. instead of using .tmpl using real extensions needed for 2 and still work like templates

Planned next:

  1. Add unit tests for all the above
  2. Replace existing file by file generators to directory generators

@@ -0,0 +1,31 @@
{
"name": "{{ .Name }}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

templating still works with real extensions

}
}

type DirectoryTemplator struct {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this provides a very generic templator that we can use for any directory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense - but i don't think everywhere will be able to use it at-least in some of the backend pieces. So I don't think we could replace everything with this. Though the majority should be able to use this.

How would this work for bits where each file needs a bit of additional context like here https://github.com/commitdev/commit0/blob/f679a5cb7eedf23c3f08a612a65ba5b7f4fee9f2/generate/proto/generate.go#L69 ?

Also should this live in the util package?

Copy link
Contributor

@jb55 jb55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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

Successfully merging this pull request may close these issues.

None yet

3 participants