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: Startsesbuildin watch mode and runsnpm run build:watch. When source files inapp/assets/are modified,esbuildautomatically updates the compiled bundles inpublic/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