0.1.2 • Published 6 years ago

grunt-closure-compiler-js v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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