A quick and easy transform for Browserify to make use of Haml with straight javascript.
Gruntfile.js
grunt.initConfig({
...
watchify: {
options: {
callback: function(b) {
b.transform('hamlify-js');
return b;
}
}
}
...
example.haml
%span=user.name
example.js
template = require('example.haml')
contents = template({user: {name: 'Someone'}})