Build Command
The build command is the default command that processes your Angular application and generates static HTML files for all routes.Usage
What It Does
The build process performs the following steps:- Configuration Loading - Loads the Scully configuration from
scully.config.ts - Route Discovery - Analyzes the Angular application to discover all routes
- Route Data Collection - Pulls in route-specific data (blog posts, content files, etc.)
- Page Rendering - Renders each route using Puppeteer or Playwright
- Static File Generation - Writes the rendered HTML to the output directory
Output
By default, Scully generates static files in the./dist/static directory. Each route becomes a static HTML file:
Common Options
Watch Mode
Automatically rebuild when files change:Production Mode
Build with production optimizations:Scan Routes
Force Scully to scan for new routes:Route Filtering
Build only specific routes:Clean Build
Remove previous static files before building:Build Performance
Monitor build performance with statistics:scullyStats.json file with detailed timing information:
Performance Metrics Explained
- numberOfRoutes - Total routes processed
- generatingTime - Total build time in seconds
- routesPerSecond - Build throughput
- findingRoutesAngular - Time spent discovering routes
- routeDiscovery - Time spent pulling route data
- renderingPages - Time spent rendering HTML
Build Output Example
Typical build output:Debug Mode
Run with visible Chromium browser for debugging:Configuration File
Specify a custom configuration file:Project Selection
In a monorepo, specify which project to build:Error Handling
Plugin Errors
By default, Scully exits on plugin errors. To continue despite errors:Show Guess Errors
Display routing errors from the Guess parser:Advanced Usage
Server Timeout
Increase timeout for large projects:Base Filter
Filter unhandled routes with wildcards:Custom Plugin Folder
Specify a custom plugin directory:Build Hooks
Scully executes several hooks during the build process:beforeAll- Before any processing startsrouteDiscoveryDone- After routes are discoveredbeforeEach- Before each route is renderedafterEach- After each route is renderedallDone- After all routes are processed
scully.config.ts to customize the build process.
CI/CD Integration
For continuous integration environments:--noPrompt flag prevents interactive prompts, making it suitable for automated builds.
Troubleshooting
Build Hangs or Times Out
Increase the server timeout:Routes Not Found
Force route scanning:Memory Issues
For large sites, you may need to increase Node’s memory:Next Steps
- Learn about serving your generated files
- Explore all command-line options
- Configure plugins for custom rendering

