Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.12 KB

README.md

File metadata and controls

41 lines (30 loc) · 1.12 KB

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