moon test --deny-warn
moon run showcase
moon run official_spec_report
moon run cli --template "{{#user}}{{name}}{{/user}}{{> footer}}" --scan
cd playground && npm ci && npm run differentialmoon check
moon testmoon run showcase
moon run scenario_report
moon run official_spec_reportcd playground
npm install
npm run devmoon run --target js cli --template-file "examples/files/template.mustache" --json-file "examples/files/context.json" --partials-json-file "examples/files/partials.json"| Syntax | Meaning | Status |
|---|---|---|
| {{name}} | escaped variable | supported |
| {{{name}}} / {{& name}} | unescaped variable | supported |
| {{#items}}...{{/items}} | section | supported |
| {{^empty}}...{{/empty}} | inverted section | supported |
| {{! note }} | comment | supported |
| {{> card}} | partial | supported |
| {{=<% %>=}} | delimiter change | supported |
| standalone section/comment/partial lines | whitespace trimming | supported |
| {{user.name}} | dotted lookup | supported |
| {{.}} | current context | supported |
{{#users}}
- {{name}} <{{email}}>
{{/users}}
{{^users}}
No users found.
{{/users}}
{{> footer}}{
"users": [
{ "name": "Alice", "email": "alice@example.com" },
{ "name": "Bob", "email": "bob@example.com" }
]
}{
"footer": "Generated by Moon Mustache."
}- Alice <alice@example.com>
- Bob <bob@example.com>
Generated by Moon Mustache.moon run climoon run cli --template "Hello {{name}}" --var name=MoonBitmoon run cli --template "{{> card}}" --partial "card={{name}} builds tooling." --var name=MoonBitmoon run cli --template "{{user.name}}/{{enabled}}/{{count}}" --var user.name=Alice --var enabled=true --var count=3moon run cli --template "A{{> missing}}B" --strictmoon run cli --examplesmoon run cli --template "{{#user}}{{name}}{{/user}}{{> footer}}" --scanmoon run cli --template "Hello {{name}}" --strict --strict-missingmoon run --target js cli --bundle-manifest-file "examples/bundle/manifest.json" --json-file "examples/bundle/context.json" --bundle-output-dir "out_bundle_demo"moon run --target js cli --bundle-manifest-file "examples/bundle/manifest.json" --bundle-profile prod --json-file "examples/bundle/context.json" --bundle-output-dir "out_bundle_demo" --bundle-report-file "out_bundle_demo/report.json" --bundle-report-format jsonmoon run --target js cli --bundle-manifest-file "examples/bundle/manifest.json" --bundle-profile dev --json-file "examples/bundle/context.json" --bundle-check-only --bundle-validation-file "out_bundle_check/validation.md" --bundle-plan-file "out_bundle_check/plan.md"moon run cli --json "{\"name\":\"MoonBit\",\"role\":\"renderer\"}" --template "Hello {{name}}, core={{role}}"$json='{"name":"MoonBit","role":"renderer"}'
$encoded=[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($json))
moon run cli --json-base64 $encoded --template "Hello {{name}}, core={{role}}"moon run --target js cli --template-file "examples/files/template.mustache" --json-file "examples/files/context.json" --partials-json-file "examples/files/partials.json"moon run --target js cli --template-file "examples/files/template.mustache" --json-file "examples/files/context.json" --partials-json-file "examples/files/partials.json" --output "rendered.txt"