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

Template engine #65

Open
shapkarin opened this issue Jan 17, 2019 · 8 comments
Open

Template engine #65

shapkarin opened this issue Jan 17, 2019 · 8 comments

Comments

@shapkarin
Copy link
Collaborator

shapkarin commented Jan 17, 2019

I think about to use some JS template engine to generate files. To easily add some new templates for this project.

@shapkarin
Copy link
Collaborator Author

shapkarin commented Jan 17, 2019

Maybe event some without html tags. And pass there any data to use loop or if statements next.

@rajikaimal
Copy link
Contributor

Can you give an example for a JS template engine?

@shapkarin
Copy link
Collaborator Author

shapkarin commented Jan 19, 2019

It's just an idea. I'll try it.

@shapkarin
Copy link
Collaborator Author

@rajikaimal something like this https://codesandbox.io/s/rlo9vxqmn4
but with auto newlines

@shapkarin
Copy link
Collaborator Author

shapkarin commented Jan 19, 2019

I think that this way you can easily create that kind of templates

function TestComponent ({ prop1, prop2, prop3 })

and so on

@shapkarin
Copy link
Collaborator Author

We just need to add indents and new lines somehow. Later I'll research that too.

@shapkarin
Copy link
Collaborator Author

shapkarin commented Jan 19, 2019

It has new lines and indents. I just didn't saw that in html output. You can check by link

@shapkarin
Copy link
Collaborator Author

shapkarin commented Apr 5, 2019

@rajikaimal I added prettier to the example. but still not so good because of how it works with empty lines
Also I found project that uses that engine

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

No branches or pull requests

2 participants