Skip to content

nkzawa/grunt-closurecompiler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The ClosureCompiler.js Grunt Task Build Status

Yet simple, but powerful. Available through npm.

Usage

grunt.initConfig({
    closurecompiler: {
        minify: {
            files: {
                // Destination: Sources...
                "Gruntfile.min.js": [__filename]
            },
            options: {
                // Any options supported by Closure Compiler, for example:
                "compilation_level": "SIMPLE_OPTIMIZATIONS",
                
                // Plus a simultaneous processes limit
                "max_processes": 5,

                // And an option to add a banner, license or similar on top
                "banner": "/* hello world! */"
            }
        }
    },
});

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.

License

Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html

About

The ClosureCompiler.js Grunt Task

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%