The ClosureCompiler.js Grunt Task

The ClosureCompiler.js Grunt Task

Yet simple, but powerful. Available through npm.

    closurecompiler: {
        minify: {
            files: {
                // Destination: Sources... 
                "Gruntfile.min.js": [__filename]
            options: {
                // Any options supported by Closure Compiler, for example: 
                "compilation_level": "SIMPLE_OPTIMIZATIONS"
grunt.registerTask('minify', ['closurecompiler:minify']);

Run it: grunt minify

See also: Gruntfile.js

Works like any other Grunt plugin/task. See the ClosureCompiler.js project for detailed information on available options and the Grunt website for everything Grunt.

Apache License, Version 2.0 -