Converting HAML to HTML on Windows
Is there a haml to html converter for windows i see on ubuntu we are using grunt. Ex. In terminal, grunt haml converts my .haml code to .php offline. Does Windows have an app or something?
+3
Goper leo zosa
source
to share
1 answer
There's grunt-haml-php . But it doesn't work well on windows. To make it work on windows you need to do some hacks.
After the installation is complete, find the file node_moules / grunt-haml-php / tasks / haml.js and we have to do some customization like this.
...
var compileHaml = function(item, cb) {
var args = ['-t', hamlTarget || 'php', item ];
// change the above line to the following
// var args = [path.join(__dirname, '../bin/haml'), '-t', hamlTarget || 'php', item ];
...
var child = grunt.util.spawn({
cmd: path.join(__dirname, '../bin/haml'),
// change the above line to the following
// cmd: 'php',
args: args
}, function(error, result, code) {
cb(error, result.stdout);
});
...
grunt-haml-php uses MtHaml , but it looks like MtHaml is still unstable. It doesn't have many features yet.
Hope this answer helps you with what you are looking for.
0
artificis
source
to share