Giter VIP home page Giter VIP logo

guard-haml's Introduction

Guard::Haml

Guard yo Haml, guard yo html cuz they compilin errybody out here.

Install

As the gem name suggests this is a guard extension. Make sure you get guard first.

Install the gem:

gem install guard-haml

Add it to your Gemfile if you're using bundler (you should)

gem 'guard-haml'

Add a basic guard setup:

guard init haml

Options

If you want to change the output directory use the output option in your Guardfile, e.g.:

guard 'haml', :output => 'public' do
  watch %r{^src/.+(\.html\.haml)}
end

This output is relative to the Guardfile.

If you maintain your haml files in a directory that should not be part of the output path, you can set the input option, e.g.:

guard 'haml', :output => 'public', :input => 'src' do
  watch %r{^src/.+(\.html\.haml)}
end

So when you edit a file src/partials/_partial.html.haml it will be outputted in public/partials/_partial.html without the src.

If you want to pass options to the Haml engine, you can set the haml_options option, e.g.:

guard 'haml', :output => 'public', :input => 'src', :haml_options => { :ugly => true } do
  watch %r{^src/.+(\.html\.haml)}
end

This will produce compressed HTML. See Haml Reference for more details.

Development

Pull requests are welcome. Specs are very welcome, make sure you support both ruby 1.8.7 and ruby 1.9.2.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.