{"name":"google-closure-compiler","version":"20250412.0.0-nightly","keywords":["javascript","compiler","optimizer","minifier","closure","gulpplugin","gruntplugin"],"license":"Apache-2.0","_id":"google-closure-compiler@20250412.0.0-nightly","maintainers":[{"name":"chadhikes","email":"chadkillingsworth@gmail.com"},{"name":"blickly","email":"blickly+npm@google.com"},{"name":"brad4d","email":"bradfordcsmith@google.com"},{"name":"lharker","email":"lharker@google.com"}],"contributors":[{"name":"Chad Killingsworth","email":"chadkillingsworth@gmail.com"}],"homepage":"https://developers.google.com/closure/compiler/","bugs":{"url":"https://github.com/google/closure-compiler/issues"},"bin":{"google-closure-compiler":"cli.js"},"dist":{"shasum":"cccf42ef6d9d6391c83b92b29cc715757bd817df","tarball":"http://registry-npm.ywwl.com/google-closure-compiler/download/google-closure-compiler-20250412.0.0-nightly.tgz","fileCount":163,"integrity":"sha512-trFOBlPqZan8rJv3OUPZTUEHYGT1emOE2zLUVlu4eX8y0aV1MY+lF4dJuNJgfdE8q4mDQ+GjSeOpfyZFvN4L1w==","signatures":[{"sig":"MEYCIQDxJNi/9LKxSc60LP7UK+6uMR9bB56tqaSTQAP61FGG3wIhAKEhK33SEJtIB9DQJBqDZ0x5FYufIE84lFvpPDyI/uXi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17220157,"size":2561149,"noattachment":false,"key":"/google-closure-compiler/-/google-closure-compiler-20250412.0.0-nightly.tgz"},"main":"index.js","engines":{"node":">=10"},"gitHead":"47ba50391e5bf7f8f4c6118a0cda791abbeb26cb","scripts":{"test":"mocha","build":"echo \"google-closure-compiler build\""},"_npmUser":{"name":"chadhikes","email":"chadkillingsworth@gmail.com"},"repository":{"url":"git+https://github.com/google/closure-compiler-npm.git#master","type":"git"},"_npmVersion":"10.8.2","description":"Check, compile, optimize and compress Javascript with Closure-Compiler","directories":{},"_nodeVersion":"20.19.0","dependencies":{"chalk":"4.x","vinyl":"2.x","minimist":"1.x","vinyl-sourcemaps-apply":"^0.2.0","google-closure-compiler-java":"^20250412.0.0-nightly"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ncp":"^2.0.0","gulp":"4.x","mocha":"10.x","semver":"^5.7.2","should":"^13.2.3","gulp-mocha":"8.x","gulp-filter":"6.x","stream-assert":"^2.0.3","gulp-sourcemaps":"2.x"},"optionalDependencies":{"google-closure-compiler-osx":"^20250412.0.0-nightly","google-closure-compiler-linux":"^20250412.0.0-nightly","google-closure-compiler-windows":"^20250412.0.0-nightly"},"_npmOperationalInternal":{"tmp":"tmp/google-closure-compiler_20250412.0.0-nightly_1744460356005_0.4612649402958484","host":"s3://npm-registry-packages-npm-production"},"readme":"# google-closure-compiler\n[![npm version](https://badge.fury.io/js/google-closure-compiler.svg)](https://badge.fury.io/js/google-closure-compiler)\n\nCheck, compile, optimize and compress Javascript with Closure-Compiler\n\nThis repository tracks issues related to the publication to npmjs.org and associated plugins.\nAny bugs not related to the plugins themselves should be reported to the\n[main repository](https://github.com/google/closure-compiler/).\n\n**Note that the installed binary is not actually JavaScript, but native binary or Java jar file depending on the local system.** \n\n## Getting Started\nIf you are new to [Closure-Compiler](https://developers.google.com/closure/compiler/), make\nsure to read and understand the\n[compilation levels](https://developers.google.com/closure/compiler/docs/compilation_levels) as\nthe compiler works very differently depending on the compilation level selected.\n\nFor help or questions with the compiler, the best resource is\n[Stack Overflow](http://stackoverflow.com/questions/tagged/google-closure-compiler). Posts there\nare monitored by multiple Closure Compiler team members.\n\nYou may also post in the\n[Closure Compiler Discuss Google Group](https://groups.google.com/forum/#!forum/closure-compiler-discuss).\n\n*Please don't cross post to both Stack Overflow and Closure Compiler Discuss.*\n\nThe compiler is distributed as a Java jar or as Mac OS, Linux and Windows native binaries.\n\n### Native Binary Version\nOn Linux, Mac OS and Windows, optional dependencies will install a native binary of the compiler.\nNative binaries offer faster compile times without requiring Java to be installed and available.\nCompilations with a very large number of source files may be slightly slower than the java version.\n\n### Java Version\nRequires java to be installed and in the path. Using the java version typically results in faster compilation times.\n\n## Usage\nThe simplest way to invoke the compiler (e.g. if you're just trying it out) is with [`npx`](https://www.npmjs.com/package/npx):\n\n    npx google-closure-compiler --js=my_program.js --js_output_file=out.js\n\nThe npx version will attempt to detect the best platform to use. You can also specify the platform\nwith the special `--platform` flag.\n\n### Installation\n\n```\nnpm install --save google-closure-compiler\n```\n\n### Configuration\n\nSee the [full list of compiler flags](https://github.com/google/closure-compiler/wiki/Flags-and-Options).\n\nThe build tool plugins take options objects. The option parameters map directly to the\ncompiler flags without the leading '--' characters. You may also use camelCase option names.\n\nValues are either strings or booleans. Options which have multiple values can be arrays.\n\n```js\n  {\n    js: ['/file-one.js', '/file-two.js'],\n    compilation_level: 'ADVANCED',\n    js_output_file: 'out.js',\n    debug: true\n  }\n```\n\nFor the java version, some shells (particularly windows) try to do expansion on globs rather\nthan passing the string on to the compiler. To prevent this it is necessary to quote\ncertain arguments:\n\n```js\n  {\n    js: '\"my/quoted/glob/**.js\"',\n    compilation_level: 'ADVANCED',\n    js_output_file: 'out.js',\n    debug: true\n  }\n```\n\n## Build Tool Plugins\nThe compiler package also includes build tool plugins for [Grunt](http://gruntjs.com/) and [Gulp](http://gulpjs.com/). There is also an [official webpack plugin](https://www.npmjs.com/package/closure-webpack-plugin).\n\n * [Grunt Plugin](https://github.com/chadkillingsworth/closure-compiler-npm/blob/master/packages/google-closure-compiler/docs/grunt.md)\n * [Gulp Plugin](https://github.com/chadkillingsworth/closure-compiler-npm/blob/master/packages/google-closure-compiler/docs/gulp.md)\n\n### Community Maintained Plugins\nAdditionally, community members have created plugins leveraging this library.\n * [Rollup Plugin](https://github.com/ampproject/rollup-plugin-closure-compiler)\n\n## Advanced Java Version Usage\n\n### Changing the Path to the Java SDK\n\nOverride the path before first use.\n\n```\nimport Compiler from 'google-closure-compiler';\n\nconst compiler = new Compiler({args});\ncompiler.javaPath = '/node_modules/MODULE_NAME/jre/jre1.8.0_131.jre/Contents/Home/bin/java';\n```\n\n## Native Node Usage (for Plugin Authors)\nA low-level node class is included to facilitate spawning the compiler jar as a process from Node.\nIn addition, it exposes a static property with the path to the compiler jar file.\n\n### Java Version\n\n```js\nimport ClosureCompiler, {COMPILER_PATH, CONTRIB_PATH} from 'google-closure-compiler';\n\nconsole.log(COMPILER_PATH); // absolute path to the compiler jar\nconsole.log(CONTRIB_PATH); // absolute path to the contrib folder which contain externs\n\nconst closureCompiler = new ClosureCompiler({\n  js: 'file-one.js',\n  compilation_level: 'ADVANCED'\n});\n\nconst compilerProcess = closureCompiler.run((exitCode, stdOut, stdErr) => {\n  //compilation complete\n});\n```\n\n## License\nCopyright 2015 The Closure Compiler Authors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Version History\nClosure Compiler release notes can be found on the\n[main repository wiki](https://github.com/google/closure-compiler/wiki/Releases).\n","publish_time":1744460356260,"_cnpm_publish_time":1744460356260,"dist-tags":{"latest":"20261028.0.0","nightly":"20250515.0.0-nightly","webpack-beta":"20181231.0.0-webpack-beta"}}