A Node.js wrapper for the Google Closure Compiler Service API that compiles JavaScript remotely without a Java dependency. Current stable version is 0.6.1. Release cadence is low; the library is minimal and stable. Key differentiators: no Java runtime required unlike the official closure-compiler Java implementation, simple API with both command-line and programmatic usage. Alternatives include google-closure-compiler (Java-based) and terser.
npm install closure-compiler-serviceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minifies JavaScript via Google Closure Compiler Service API using both default and advanced options.
Leave output_format as 'json' or handle non-JSON response manually.
Ensure js_code is a string or Buffer; use .toString() if needed.
Wrap call in try-catch for network failures or use a timeout.
Check internet connection or retry later.
Convert input to a string or Buffer before passing.
Use one of: 'WHITESPACE_ONLY', 'SIMPLE_OPTIMIZATIONS', 'ADVANCED_OPTIMIZATIONS'.
No dependency data recorded yet.