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

Render Plush templates from Command Line #19

Open
meson10 opened this issue Nov 6, 2017 · 3 comments
Open

Render Plush templates from Command Line #19

meson10 opened this issue Nov 6, 2017 · 3 comments
Labels
enhancement New feature or request proposal A suggestion for a change, feature, enhancement, etc
Milestone

Comments

@meson10
Copy link

meson10 commented Nov 6, 2017

I have started using Plush in one of my project. Firstly, Good work 👍
As a part of the code pipeline, some of the Plush templates need to be validated for consistency and the output they will render.

Inspired from the erb command line tool, I have added support to plush binary to render a given template based on CLI vars or input JSON file.

Example Usage:

meson10@xps:~/workspace/plush$ cat hello.plush 
Hello, <%= name %>

meson10@xps:~/workspace/plush$ plush render hello.plush 
Hello, 

meson10@xps:~/workspace/plush$ cat test.json 
{"name": "world"}

meson10@xps:~/workspace/plush$ plush render hello.plush -c test.json 
Hello, world

meson10@xps:~/workspace/plush$ plush render hello.plush -v name=Mark
Hello, Mark

If this is of merit to your code I can send a PR.
Alternatively, Please suggest if there is a better way to achieve the desired functionality.

@markbates
Copy link
Member

That sounds great! I would love to see the plush binary get that.

@meson10
Copy link
Author

meson10 commented Nov 6, 2017

@markbates Ok cool. Sending PR.

@meson10
Copy link
Author

meson10 commented Nov 6, 2017

@markbates #20

@sio4 sio4 added enhancement New feature or request proposal A suggestion for a change, feature, enhancement, etc labels Sep 4, 2022
@sio4 sio4 added this to the Proposal milestone Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal A suggestion for a change, feature, enhancement, etc
Projects
None yet
Development

No branches or pull requests

3 participants