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

The documentation should point to working mustache reference implementation for (at least) the major OS. #85

Open
strub opened this issue Dec 8, 2020 · 5 comments

Comments

@strub
Copy link

strub commented Dec 8, 2020

Hi,

Currently, it is not clear how to get a workable mustache implementation under MacOS. The mustache packaged in opam does not accept YAML as input. I tried gem install mustache which does not seem to install a binary (only a ruby package) - (I could certainly wrap a simply ruby script, but that not scalable). I tried go get github.com/hoisie/mustache which... does not seem to install binary (only a Go package). I am bailing out. Maybe I overlooked something?

@strub strub changed the title The documentation should point to working reference implementation for (at least) the major OS. The documentation should point to working mustache reference implementation for (at least) the major OS. Dec 8, 2020
@Zimmi48
Copy link
Member

Zimmi48 commented Dec 9, 2020

Does brew install mstch work? (I didn't try it and its README is not clear on whether it supports YAML).
Otherwise, it seems that the JS implementation available on npm (https://www.npmjs.com/package/mustache) includes a CLI tool. This should be pretty much universal...

@strub
Copy link
Author

strub commented Dec 10, 2020

So, I managed to find the mustache binary installed by gem install mustache- (I am not versed in the ruby environment, the binary was not accessible via $PATH by default). Answering your previous question, brew install mstch (that is not listed by brew search mustache) installed a C++ library, but not a CLI front-end, as shown by brew ls --verbose mstch:

/usr/local/Cellar/mstch/1.0.2/INSTALL_RECEIPT.json
/usr/local/Cellar/mstch/1.0.2/LICENSE
/usr/local/Cellar/mstch/1.0.2/.brew/mstch.rb
/usr/local/Cellar/mstch/1.0.2/include/mstch/mstch.hpp
/usr/local/Cellar/mstch/1.0.2/README.md
/usr/local/Cellar/mstch/1.0.2/lib/pkgconfig/mstch.pc
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-config.cmake
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-targets-release.cmake
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-targets.cmake
/usr/local/Cellar/mstch/1.0.2/lib/cmake/mstch/mstch-config-version.cmake
/usr/local/Cellar/mstch/1.0.2/lib/libmstch.a

Requiring users to install npm seems a bit overkill to me. But in all cases, the README of this repository should give pointers to working implementations.

PS: I am planning to add a YAML front-end to the OCaml version. I will ping this ticket when done.

@anton-trunov
Copy link
Member

I am planning to add a YAML front-end to the OCaml version. I will ping this ticket when done.

That would be great! Here is the relevant issue: rgrinberg/ocaml-mustache#40

@strub
Copy link
Author

strub commented Dec 10, 2020

I am planning to add a YAML front-end to the OCaml version. I will ping this ticket when done.

That would be great! Here is the relevant issue: rgrinberg/ocaml-mustache#40

See rgrinberg/ocaml-mustache#45. Note that this is still not sufficient to parse/interpret all the templates of this repository. But I am working on this.

@ybertot
Copy link

ybertot commented Jan 21, 2022

I would like to add that on a fedora distribution of linux, I did not have mustache by default, a "dnf search mustache" showed "rubygem-ustache.noarch", which I inferred to be the closest to ruby-mustache, as prescribed by the README file. I don't find this foolproof enough. Any opinion?

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

4 participants