Top

Constexpr.js compiler injects some methods in the runtime of a page which the rendering code can use to coordinate/manipulate the behaviour of the compiler. This page describes these methods.

  • window._ConstexprJS_.compile()

    The rendering code should call this method once it has finished rendering. The page will be snapshotted and killed shortly after.

  • window._ConstexprJS_.abort(message)

    Call this method if you want the compiler to skip this page. The page will be killed shortly after.

  • window._ConstexprJS_.addPath(path)

    Use this method to tell the compiler that it needs to generate additional HTML files in the output directory. This method doesn't affect the current page in any way. See this page for detailed documentation.

  • window._ConstexprJS_.addExclusion(paths) window._ConstexprJS_.addDependency(path)

    Manage dependencies of current page. Read this page to learn how the compiler resolves dependencies of a page.

  • window._ConstexprJS_.log(message)

    Print a message on the compiler stdout. The message is prefixed with the generator path before printing.

See pages tagged with constexpr.js for more guides.