qmetrics.net

r.js

RequireJS AMD runner and JavaScript module optimizer

Build & DeploymentDesktop/CLI app

r.js is a command-line tool to run AMD-based JavaScript with RequireJS and to optimize and bundle modules for browsers. It works with the RequireJS AMD implementation.

Overview

r.js is a command-line utility for JavaScript projects that use the Asynchronous Module Definition API to declare and load modules. It belongs to the RequireJS project and runs AMD scripts together with the RequireJS loader implementation.

One role is executing AMD application entry points, for example running main.js under Node with npm install -g requirejs, or under Nashorn, Rhino, or xpcshell with the documented java or shell invocations. It can load npm-installed Node modules when run in Node.

The other role is the optimizer invoked with -o and a build config file. During optimization it runs require.js so it traces module dependencies and inlines them, which matters for anonymous modules that break under naive concatenation. Rhino setups can pair with Closure Compiler jars for minification.

Additional commands include printing combined r.js and require.js versions and converting directories of CommonJS modules to define()-wrapped AMD modules, though some dynamic require patterns and circular dependencies may fail. The optimizer outperforms plain concatenation because it understands the AMD dependency graph.

Key features

  • Run AMD entry points from CLI
  • Module bundling via optimizer
  • Dependency tracing for anonymous modules
  • CommonJS to define() conversion
  • Node, Rhino, Nashorn, xpcshell hosts
  • Closure Compiler integration option
  • Version and convert subcommands

Use cases

  • Building RequireJS apps for production
  • Running AMD main.js under Node
  • Migrating CommonJS modules to AMD
  • Java-based JS build pipelines with Rhino

Similar software

nvm

POSIX shell version manager for Node.js

nvm installs and switches between Node.js versions from the command line on POSIX shells including bash and zsh.

★ 96.3k⟳ 2 days agoMIT
Build & DeploymentDesktop/CLI app

uv

Fast Python package and project manager

uv is a Rust-based tool that manages Python dependencies, virtual environments, scripts, and interpreters. It offers a pip-compatible interface and universal lockfiles for projects.

★ 92.7k⟳ 2 days agoApache-2.0
Build & DeploymentDesktop/CLI app

Hugo

Go-based static site generator with flexible templating

Hugo is a static site generator written in Go. It turns content and templates into deployable HTML sites with asset pipelines for CSS, JavaScript, Sass, and images.

★ 90.6k⟳ todayApache-2.0
Build & DeploymentDesktop/CLI app

Vite

Frontend build tool for modern web projects

Vite is a build tool for modern web projects, combining a development server with an optimized production build. It targets a faster, leaner local development workflow.

★ 84.2k⟳ yesterdayMIT
Build & DeploymentDesktop/CLI app

act

Local runner for GitHub Actions workflows

A command-line tool that executes GitHub Actions workflows on your machine using Docker. It mirrors GitHub’s environment for faster feedback while editing workflow files.

★ 72.8k⟳ 12 days agoMIT
Build & DeploymentDesktop/CLI app

Moby

Modular toolkit for assembling container systems

Moby bundles container build, runtime, registry, and orchestration components so integrators can craft custom container platforms instead of using a single fixed product.

★ 72.3k⟳ todayApache-2.0