Skip to content

jakewins/requirehaml

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

requirehaml

A quick-hack javascript that monitors a folder tree for changes in *.haml files, and compiles them into javascript templates that you can import using require.js.

Requires node.js and haml-js (npm install haml)

Usage:

requirehaml my/source/folder my/target/folder

Note: Does not pick up if you create a new file, simply re-issue the command if you create a new file.

Example:

#home
  = title
  %ul.menu
    %li Go Home
    %li Go Back

Becomes:

define(function(){return function(vars){ with(vars||{}) { return "<div id=\"home\">" + title + "<ul class=\"menu\"><li>Go Home</li><li>Go Back</li></ul></div>";}}; });

About

A command line tool to automatically compile haml templates to javascript, in a format usable by require.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published