gruntjs - HTMLmin - How to dynamically compress all files inside a certain folder -


i want minify html pages , maintain page's name , path on dist folder. want loop through folders.

the code below works fine parent folder (which case app/views).

grunt.initconfig({     htmlmin: {         dev: {             files: [{                 expand: true,                 cwd: 'app/views/**',                 src: '{,*/}*.html',                 dest: 'dist/views'             }]         }     } }); 

as can notice, tried magic star @ path app/views/** , had no luck.

this folder structure:

app/views/ ├── page1.html ├── blocks │   └── block.html ├── page2.html └── page3.html 

in case, every template gets minified, except ones under app/views/blocks folder.

cwd: 'app/views', src: '**/*.html', 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -