
Product
Introducing Reports: An Extensible Reporting Framework for Socket Data
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.
grunt-google-closure-tools-compiler
Advanced tools
Another Grunt task for Google Closure Compiler. Uses compiler npm build or you can use your own (eg: nightly builds)
Another Grunt task for Google Closure Compiler. Uses compiler npm build or you can use your own (eg: nightly builds)
(Table of contents generated by [verb])
This plugin requires Grunt >= 0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
Install with npm
$ npm install grunt-google-closure-tools-compiler --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-google-closure-tools-compiler');
Run this task with the grunt closurecompiler command.
This task requires that you have the closure compiler jar file anywhere on your building machine. However, this plugin loads the npm closure compiler.jar and set it as default compiler. You still can use a custom or another build from closure to set a new path to the jar file you want.
Task targets, files and options may be specified according to the grunt Configuring tasks guide.
Choices: 'SIMPLE', 'ADVANCED' , 'WHITESPACE_ONLY'
Default: 'SIMPLE'
Choose which closure compilation level we should use.
Type: Boolean
Default: true
If true, a source map file will be generated in the same directory as the dest file. By default it will have the same basename as the dest file, but with a .map extension.
Choices: 'ECMASCRIPT3', 'ECMASCRIPT5' , 'ECMASCRIPT5_STRICT', 'ECMASCRIPT6', 'ECMASCRIPT6_STRICT', 'ECMASCRIPT6_TYPED'
Default: 'ECMASCRIPT3' (null)
Choices: 'ECMASCRIPT3', 'ECMASCRIPT5' , 'ECMASCRIPT5_STRICT', 'ECMASCRIPT6_TYPED'
Default: language in
Choices: 'PRETTY_PRINT', 'PRINT_INPUT_DELIMITER' , 'SINGLE_QUOTES'
Default: 'PRETTY_PRINT' (null)
Type: Boolean
Default: true
Turn on closure compiler debug parameter.
Type: String
Default: null
Set some custom parameters for closure execution.
Type: String
Default: ''
Put a string at the top of the compiled files.
Type: String
Default: 'node_modules/google-closure-compiler/compiler.jar'
Path to the compiler.jar file. This could be relative beginning from the google-closure-compiler directory or absolute like '/opt/closure-compiler/compiler.jar'.
Type: Integer
Default: 0
Set maxBuffer if you got message "Error: maxBuffer exceeded."
Type: String
Default: null
We use this path if it is setted. NOTE: If it is null we can also set the JAVA_HOME environment variable
Type: Boolean
Default: false
If this is true, the jar file will be executed with -client and -d32 java parameters.
Type: Boolean
Default: true
If this is true, the jar file will be executed with -server and -XX:+TieredCompilation java parameters.
// Project configuration.
grunt.initConfig({
googleclosurecompiler: {
my_target: {
files: {
'dest/output.min.js': ['src/input1.js', 'src/input2.js']
}
}
}
});
// Project configuration.
grunt.initConfig({
googleclosurecompiler: {
my_target: {
options: {
closure_compilation_level: 'ADVANCED',
banner: '/*\n' +
' * Minified by closure compiler \n' +
' */\n'
},
files: {
'dest/output.min.js': ['src/*.js']
}
}
}
});
// Project configuration.
grunt.initConfig({
googleclosurecompiler: {
my_target: {
options: {
closure_compilation_level: 'WHITESPACE_ONLY'
},
files: {
'dest/output.min.js': ['src/**']
}
}
}
});
CSoellinger
Copyright © 2015 CSoellinger Released under the MIT license.
This file was generated by verb-cli on December 21, 2015.
FAQs
Another Grunt task for Google Closure Compiler. Uses compiler npm build or you can use your own (eg: nightly builds)
The npm package grunt-google-closure-tools-compiler receives a total of 6 weekly downloads. As such, grunt-google-closure-tools-compiler popularity was classified as not popular.
We found that grunt-google-closure-tools-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.