Skip to content

AugustsK/grunt-closure-compiler-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-closure-compiler-js

Compile individual JS files with Closure Compiler

This task uses closure-compiler-js to compile individual files.

Unlike other implementations with Grunt, this task relies solely on JS version of Google Closure Compiler. Also, it does NOT produce single output file, but rather treats each JS file individually for applications, where concating all JS files is not an option.

Install

$ npm install --save-dev grunt-closure-compiler-js

Usage

grunt.initConfig({
    closurecompilerjs: {
        options: {
            compilationLevel: "ADVANCED"
        },
        dist: {
            files: [
                {
                    cwd: 'src/js',
                    src: ['**/*.js'],
                    dest: 'static/js',
                    ext: '.min.js',
                    expand: true
                }
            ]

Options

See the closure-compiler-js flags, except for warningLevel and jsCode.

License

MIT © AugustsK

About

Grunt task for Google Closure Compiler

Resources

License

Stars

Watchers

Forks

Packages

No packages published