Forge.Assets
Forge.Assets — forge assets build / deploy / watch
Shells out to esbuild to bundle the assets in assets/ into priv/static/assets/.
build — dev bundle: sourcemaps, no minification
deploy — prod bundle: minified + content-hash fingerprinting, writes manifest
watch — runs esbuild in --watch mode (for use alongside forge bastion server)Directory conventions (relative to project root): assets/js/app.js JS entry point (may import CSS) assets/css/app.css CSS entry point priv/static/assets/ output directory (gitignored) priv/static/assets/manifest.json digest manifest (deploy only)
esbuild must be on PATH. Install with: npm install -g esbuild OR brew install esbuild
Ported from cmd_assets.ml.
Functions
forge assets build — dev bundle with sourcemaps, no minification.
forge assets deploy — prod bundle: minified + digest fingerprinting.
forge assets watch — rebuild on file changes (dev mode).