serum v1.0.0 Serum.Build

A module for managing the overall project build procedure.

Link to this section Summary

Functions

Builds the given Serum project.

Link to this section Functions

Link to this function

build(src, dest)
build(binary(), binary()) :: Serum.Result.t(binary())

Builds the given Serum project.

Build Procedure

  1. Checks if a project definition file exists under src, checks if it's well-formed and valid, then loads it.

  2. Tries to load plugins listed in the project definition file.

  3. Checks if the system timezone is properly set.

    Timex requires the local timezone information to format the date/time string. If it's not set or invalid, Timex will fail.

  4. Checks if the current user has enough permission on the destination directory and cleans it if it already exists.

  5. Loads source files. See Serum.Build.FileLoader.

  6. Processes source files and produces intermediate data structures. See Serum.Build.FileProcessor.

  7. Generates HTML fragments from the intermediate data. See Serum.Build.FragmentGenerator.

  8. Renders full HTML pages from fragments and writes them to files. See Serum.Build.FileEmitter.

  9. Copies assets/ and media/ directories if they exist.