qmetrics.net

Closure Compiler

JavaScript checker optimizer and transpiler

Closure Compiler screenshot

Closure Compiler parses JavaScript, removes dead code, minifies output, and checks syntax, references, and types. It compiles JS into smaller, faster JS for browsers and supports ADVANCED whole-program optimization.

Overview

Closure Compiler is a JavaScript optimizer and static checker from Google. Instead of lowering to machine code, it rewrites source into more compact JavaScript while warning about common pitfalls and type issues.

ADVANCED mode expects code written for the compiler: whole-world visibility of globals, consistent property access patterns, goog.module() and goog.require() modules, and externs for APIs the compiler must preserve. Mixing dot and bracket property access or hiding uses can break renamed output.

Typical Google use cases include shrinking large apps, enforcing practices, preparing messages for localization, transpiling newer syntax for older browsers, and splitting output into loadable chunks without ECMAScript import syntax in those chunks.

You can run it as a Java command-line application, depend on it through Bazel, install via NPM or Yarn, or use community web and REST interfaces. A Node API package can invoke the native Graal binary or fall back to Java.

Key features

  • Dead code removal and minification
  • Syntax and type checking with warnings
  • ADVANCED whole-program optimization
  • Configurable language in and out levels
  • Externs for preserved global APIs
  • Multi-file compilation with reordering
  • NPM and Maven distribution options

Use cases

  • Shrinking large JavaScript applications
  • Transpiling to older browser targets
  • Localized message extraction workflows
  • Splitting apps into lazy-loaded chunks

Tags

Similar software

Dive

Terminal explorer for Docker image layers

Dive inspects container images layer by layer to show what changed and where space is wasted. It helps shrink Docker or OCI images during development and CI.

★ 54.8k⟳ 11 days agoMIT

Nx

Monorepo build system with caching and CI integration

Nx manages TypeScript and polyglot monorepos with task graph awareness, local and remote caching, and CI helpers. It can be added to existing npm, pnpm, or yarn workspaces.

★ 29.5k⟳ todayMIT

PostCSS

JavaScript toolkit for transforming CSS via plugins

Parses CSS into an AST and runs JavaScript plugins to lint, prefix, nest rules, inline assets, and apply other style transforms in build pipelines.

★ 29k⟳ yesterdayMIT

Emscripten

LLVM toolchain compiling C and C++ to WebAssembly

Emscripten turns C and C++ into WebAssembly via LLVM and Binaryen. Output runs in browsers, Node.js, and other WebAssembly runtimes.

★ 27.8k⟳ 2 days agoMIT · open core

Oxc

Rust-based JavaScript and TypeScript compiler toolkit

Oxc bundles a parser, linter, formatter, transformer, resolver, and minifier for JavaScript and TypeScript. Oxlint and Oxfmt run via npx for everyday lint and format tasks.

★ 23.6k⟳ todayMIT

Slim

Container inspection, minification and security profiling CLI

SlimToolkit is a command-line toolkit for inspecting, shrinking and hardening container images without rewriting your Dockerfile. It analyzes what your application actually needs and strips unused layers and files.

★ 23.6k⟳ 2 months agoApache-2.0