forked from ocaml/opam-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHANGES: * Remove the AST without locations: now all functions build an AST with locations; in particular, parsing always provide located error messages. To ease backward-compatibility, the smart constructors still use the same interface, using dummy locations by default, with a With_locations module for users who wish to explicitly provide locations. (@gasche, rgrinberg/ocaml-mustache#65) * Support for "template inheritance" (partials with parameters) `{{<foo}} {{$param1}}...{{/param1}} {{$param2}}...{{/param2}} {{/foo}` following the widely-implemented semi-official specification mustache/spec#75 (@gasche, 58) * Partials are now supported in the `mustache` command-line tool (@gasche, rgrinberg/ocaml-mustache#57) They are interpreted as template inclusion: "{{>foo/bar}}" will include "foo/bar.mustache", relative to the current working directory. * Improve error messages (@gasche, rgrinberg/ocaml-mustache#47, rgrinberg/ocaml-mustache#51, rgrinberg/ocaml-mustache#56) Note: the exceptions raised by Mustache have changed, this breaks compatibility for users that would catch and deconstruct existing exceptions. * Add `render_buf` to render templates directly to buffers (@gasche, rgrinberg/ocaml-mustache#48) * When a lookup fails in the current context, lookup in parents contexts. This should fix errors when using "{{#foo}}" for a scalar variable 'foo' to check that the variable exists. (@gasche, rgrinberg/ocaml-mustache#49)
- Loading branch information
Showing
9 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
opam-version: "2.0" | ||
synopsis: "Mustache logic-less templates in OCaml" | ||
description: """ | ||
|
||
Read and write mustache templates, and render them by providing a json object. | ||
Contains the `mustache` command line utility for driving logic-less templates. | ||
""" | ||
maintainer: ["Rudi Grinberg <me@rgrinerg.com>"] | ||
authors: [ | ||
"Rudi Grinberg <me@rgrinberg.com>" | ||
"Armaël Guéneau <armael.gueneau@ens-lyon.fr>" | ||
"Gabriel Scherer <gabriel.scherer@gmail.com>" | ||
] | ||
license: "MIT" | ||
homepage: "https://github.com/rgrinberg/ocaml-mustache" | ||
bug-reports: "https://github.com/rgrinberg/ocaml-mustache/issues" | ||
depends: [ | ||
"dune" {>= "2.7"} | ||
"jsonm" {>= "1.0.1"} | ||
"ounit2" {with-test} | ||
"ezjsonm" {with-test} | ||
"menhir" {>= "20180703"} | ||
"cmdliner" {>= "1.0.4" & < "1.1.0"} | ||
"ocaml" {>= "4.08"} | ||
"odoc" {with-doc} | ||
] | ||
build: [ | ||
["dune" "subst"] {dev} | ||
[ | ||
"dune" | ||
"build" | ||
"-p" | ||
name | ||
"-j" | ||
jobs | ||
"@install" | ||
"@runtest" {with-test} | ||
"@doc" {with-doc} | ||
] | ||
] | ||
dev-repo: "git+https://github.com/rgrinberg/ocaml-mustache.git" | ||
url { | ||
src: | ||
"https://github.com/rgrinberg/ocaml-mustache/releases/download/v3.2.0/mustache-3.2.0.tbz" | ||
checksum: [ | ||
"sha256=080b6852ce81f2604134348e19d7b1c8d2ea311519be854ad4517729508c4d4c" | ||
"sha512=80bf68ab0547002290254979cb60ad0962ac526551f9a7a0337c4f0426128b2974ca1d9efbac345613d73b340d7027e1331a0baad0d3743256dbd1b2d97f1eb0" | ||
] | ||
} | ||
x-commit-hash: "a86cab0ceb8d77d5045b4d6464b68affafb80e2e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters