Build CLI Plugin
A staticbolt CLI plugin that registers a build command for production builds. It lets you run staticbolt from the command line to build your static website with production optimizations enabled.
Installation
The plugin ships as part of @staticbolt/core. You do not need to install anything else.
Usage
In your .staticbolt.ts configuration file:
import { defineConfig } from "@staticbolt/core";import { buildCliPlugin } from "@staticbolt/core/plugins";
export default defineConfig({ plugins: [buildCliPlugin()],});Then run from the command line:
npx staticbolt build# or using the aliasnpx staticbolt bPlugin Options
command
- Type:
string - Default:
"build"
The name of the CLI command to register.
buildCliPlugin({ command: "compile",});aliases
- Type:
string[] - Default:
["b"]
Other names that also run the build command.
buildCliPlugin({ aliases: ["b", "compile", "prod"],});Behavior
When executed, the build command:
- Sets the app to production mode (
production: true) - Creates a new
Appinstance with the provided configuration - Runs the full build pipeline
- Reports the total build time in seconds
This plugin usually goes last in the plugins array, next to the other CLI plugins. It does not take part in the build pipeline itself.