Building For Production

Coal can compile your project into a fully-constructed HTML folder, and copies your assets too.

Building Coal Project for Deployment

Default Build

By using the default build mode, Coal will expect a folder called ./src, compile to ./dist, and use a version build number current coal version + ISO-8601 date

        coal build
    
Custom Build Source

To set the source folder of the project, provide it to build as an argument.

        coal build --source my_source/
        coal build -s my_source/
    
Custom Build Destination

To set the destination folder of the build, provide it to build as an argument.

        coal build --dest docs
        coal build -d docs
    
Custom Build Version String

To set the version of the build, provide it to build as an argument.

        coal build --version v1.1.1
        coal build -v v1.1.1
    
Custom Root As Assets Prefix (GitHub Pages see here!)

To set the root of the assets path, provide it to build as an argument. Learn more about Assets here.

This is useful when deploying to GitHub Pages when not using a custom domain, as the default location is:
[GitHub username].github.io/[GitHub repository name]/
Example:
https://camsjams.github.io/rust-coal/

        coal build --root "/rust-coal"
        coal build -r "/rust-coal"
    

For more detailed information, see CLI documentation.