Trott / grunt-html-smoosher

A grunt task which takes an HTML file, finds all the CSS and JS links, and outputs a version with all the CSS and JS written inline for ease of pasting into a cms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minification doesn't work

victorwoo opened this issue · comments

I've wrote a gruntfile.js with minify:true, but it doesn't work. Both JavaScript and CSS are not been minified. Here is my grunt script, is it right?

module.exports = function (grunt) {
    grunt.loadNpmTasks('grunt-html-smoosher');

    grunt.initConfig({
        smoosher: {
            options: {
                minify: true,
                jsTags: { // optional
                    start: '<script type="text/javascript">', // default: <script>
                    end: '</script>'                          // default: </script>
                }
            },
            all: {
                options: {
                    minify: true
                },
                files: {
                    'dest-index.html': 'index.html'
                }
            }
        }
    });
}