Grunt plugin integrating Google Closure Library tools (Compiler, Builder, DepsWriter) for JavaScript minification, dependency calculation, and bundling. Version 1.0.0 (stable, last release 2019) targets Grunt 0.4.x. Supports Closure Compiler jar-based compilation, closurebuilder.py concatenation, and depswriter.py deps generation. Key differentiators: full Closure toolchain integration in Grunt, support for advanced compilation options, and file-level change detection (checkModified). Alternative to gulp-closure-compiler or webpack closure plugins.
npm install grunt-closure-toolsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal Gruntfile configuring the Closure Compiler task with a jar path, source files, and simple optimizations.
Move `compilerFile`, `compilerOpts`, `execOpts` inside `options: {}` block.Consider migrating to pure Node alternatives like 'google-closure-compiler' for compilation and manual dependency management.
Download compiler.jar from https://dl.google.com/closure-compiler/compiler-latest.zip or use npm package 'google-closure-compiler-java' and set path to its jar.
Set execOpts.maxBuffer in options, e.g., `execOpts: { maxBuffer: 999999 * 1024 }`.Use grunt's usual array of file patterns in src; do not use template syntax like `'<%= pkg.name %>'` in src.
Add `grunt.loadNpmTasks('grunt-closure-tools');` to your Gruntfile.Verify the compilerFile path exists, or use an absolute path. For Windows, ensure forward slashes or escaped backslashes.
Increase the buffer by setting `execOpts: { maxBuffer: 999999 * 1024 }` in the task options.Ensure the `root` path is correct and use the `includes` option (string or array) to specify which files to scan.