grunt-closure-compiler-js

0.1.2 • Public • Published

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

Package Sidebar

Install

npm i grunt-closure-compiler-js

Weekly Downloads

4

Version

0.1.2

License

MIT

Unpacked Size

5.82 kB

Total Files

4

Last publish

Collaborators

  • augusts-karklins