Saturday, 15 January 2011

javascript - Copy entire folder structure when converting haml files to html (using grunt) -


I am using men and stubbornness and am trying to change HAM files in HML files. All my .html files are located inside / app / source and I want all my HTML files to be one level low, inside / app Changing a single file works fine, this is the code that I am using in my 'GrantFile.JS`

  file: {' & lt;% = yeoman. App% & gt; / Tester Html ':' & lt;% = yeoman.app% & gt; /source/tester.haml ',}   

But I do not want to list each file separately, so that's why I tried to do something like that, but it is not working: / P>

  Files: grunt.file.expandMapping (['& lt;% = yeoman.app% & gt; / source / * .haml'], '<% = Yeoman.app% & Gt; / source / ', {rename: function (base, path) {return base + path. Location (/ .hll $ /,' .html ');}})   

This code will probably not work with any subdirectory inside / source . I, by any thought how can I do this New?

Quick Reply:

Further explanation:

  detailed: true; // Enable the option below cwd: '<% = yeoman.app% & gt; / Source '; // Current Work Directory src: '** / *. Haml '; // All files under cwd, sub-directories include: '& lt;% = yeoman.app% & gt;'; // Destination path prefix ext: '.html'; // File extension name flaton: wrong; // KEEP folder structure   

your original "file" property, GL. Use this code to change.

No comments:

Post a Comment