CLI / assets

The assets command is used in Fullstack Roda applications to compile and bundle frontend assets (JavaScript, CSS, images) managed via Node.js and esbuild.

Overview

When building a fullstack application, roda-project configures esbuild for fast asset bundling and compiles your static resources into the public/ directory. The bin/roda assets CLI task wraps asset compilation and watching for a smooth development workflow.

Usage

$ bin/roda assets [OPTIONS]

Options

  • -w, --watch: Starts esbuild in watch mode and runs npm run build:watch. When source files in app/assets/ are modified, esbuild automatically updates the compiled bundles in public/assets/.

Examples

Single compilation run

Installs NPM dependencies (if missing) and compiles assets once for deployment or testing:

$ bin/roda assets

Watch mode for local development

Continuously recompiles assets whenever changes are detected:

$ bin/roda assets -w