Skip to content

fantleas/crustache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crustache

crustache is the implementation of mustache logic-less templates.

This library implemated mustache's spec v1.1.2+λ.

travis-ci.org docrystal.org

Installation

Add this to your application's shard.yml:

dependencies:
  crustache:
      github: MakeNowJust/crustache

Usage

require "crustache"

# Parse a mustache template
template = Crustache.parse "Hello {{Name}} World!"

# Make a model
model = {"Name" => "Crustache"}

# Render!
puts Crustache.render template, model
#=> Hello Crustache World!

Development

This library's specs are put in spec directory. They can run by crystal spec ./spec/spec.cr command.

Contributing

  1. Fork it (https://github.com/MakeNowJust/crustache/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

{{Mustache}} for Crystal 💎

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Crystal 99.4%
  • HTML 0.6%