0.0
No commit activity in last 3 years
No release in over 3 years
Guard::MtHaml automatically compiles your MtHaml template files to PHP, Twig or static HTML.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.1.0
 Project Readme

Guard::MtHaml Gem Version

This is a Guard wrapper for MtHaml to compile Haml to PHP, Twig or static HTML.

Installation

Add to your Gemfile:

gem "guard-mthaml"

Require in your Guardfile:

require "guard/mthaml"

Or, add the default Guard::MtHaml template to your Guardfile by running:

$ guard init mthaml

Usage

Requires that php be executable via command line.

###
# Sample Guardfile block for Guard::MtHaml
#
# :input           ("views/src") set input directory with haml files
# :output          ("views")     set output directory for compiled files
# :environment     ("php")       haml environment
# :extension       (nil)         output file extension, uses environment if nil
# :notifications   (true)        toggle guard notifications
# :compress_output (false)       compress compiled haml files
# :static_files    (false)       compile haml to static html
# :run_at_start    (true)        compile files when guard starts
###
guard :mthaml, :input => "views/src", :output => "views"

Filters

Currently, only support for Markdown and CoffeeScript is available. I will eventually support Sass (pull requests are welcome). MtHaml doesn't have a way of disabling the runtime variables inside of filters when attempting to use interpolation (#{$var}); this is a known issue that needs to be addressed within MtHaml before it can be included into this plugin.

Authors

Ezekiel Gabrielse

License

Graphite is available under the MIT license.