We are working very hard to bring you the best documentation possible.
COMMAND LINE
CLI
Beginning with v1.0.0, fusion.ssg no longer includes a project generator in its package and no longer provides the ability to create new projects directly through its CLI. Please read Project Generator for more information about how to create a new project using fpg.
fusion.ssg's CLI supports the following workflows and options:
Development Workflows
When building for development, the files and folders included in your configuration's wips property are not ignored, and the baseURL property value declared in your project's configuration file is not applied to all URLs that contain a {baseURL} token.
The following commands must all be run from the project's root folder.
Watch, Build, Serve
Watches your project's root/src and root/fusion.json for changes, and runs fusion build
, and launches Browsersync.
- usage:
One Off Builds
- usage:
or
Release Workflows
When building for release, the files and folders included in your configuration's wips property are ignored, and the baseURL property value declared in your project's configuration file is applied to all URLs that contain a {baseURL} token.
The following commands must all be run from the project's root folder.
Watch, Release, Serve
Watches your project's root/src and root/fusion.json for changes, and runs fusion release
, and launches Browsersync.
- usage:
One Off Releases
- usage:
or
Optional Verbose Metrics Reporting
Introduced in v1.3.0
Beginning with v1.3.0, metrics reporting to the console after each build cycle now defaults to a condensed set of metrics for both development and release builds. The detailed metrics reporting of previous versions is still available via the --verbose
option and can be applied to either development or release builds or to both.
Optional Cache Busting Of Release Builds
Introduced in v1.2.0
When building for release, fusion.ssg can optionally cache bust your site's assets (e.g. css, media, scripts, .etc), allowing your site's visitors to immediately experience its latest changes. fusion.ssg handles all the details, so no additional configuration or changes to your project, other than those described below, are required.
To opt in to cache busting, you can do one or both of the following:
-
Append
--cache-bust
to the end of the release:fusion script located in your project's package.json file, i.e."release:fusion": "fusion release --cache-bust"
. -
Run
fusion r | release --cache-bust
.
fusion.ssg relies on Buster, which is a very capable and resilient cache busting tool developed by the same team that brings you fusion.ssg, to implement its cache busting.
Other Commands Supported By The CLI
Version
Displays the version.
- usage:
Help
Displays general and command specific help.
- usage: