alexluke / grunt-haml-php

Process HAML templates using MtHaml, a PHP port of Haml.
MIT License
9 stars 8 forks source link

[Patch] Remove the re-create the src folders structure in the dest folder #8

Open Mte90 opened 10 years ago

Mte90 commented 10 years ago

With this config in Gruntfile.js:

haml: {
      compile: {
        files: [{
          expand: true,
          src: ['assets/haml/*.haml'],
          dest: 'templates/',
          ext: '.php'
        }]
      }
    },

The php file is created in templates/assets/haml/*.php. if i set the dest folder and i don't want that create the same folder structure?

Edit the tasks/haml.js of this repo: Replace the line 28:

var temp = this.files;

Replace the line 36:

writeFile(temp[0].orig.dest + f.dest.replace(/^.*[\\\/]/, ''), err);

Replace the line 39:

writeFile(temp[0].orig.dest + f.dest.replace(/^.*[\\\/]/, ''), results.join(grunt.util.normalizelf(options.separator)));

Now the path it's correct :-)

Mte90 commented 9 years ago

any news for this?