Skip to content

Build Plugin Base

Use the ClientBuilderBase to implement a new stage or custom handling during the frontend build lifecycle. Note that this API is still under development and might change between minor Mountaineer versions.

mountaineer.js_compiler.base.ClientBuilderBase

ClientBuilderBase(tmp_dir=None)

Bases: ABC

Base class for client builders. When mounted to an AppController, these build plugins will be called for every file defined in the view/app directory. It's up to the plugin whether to handle the incoming file.

tmp_dir instance-attribute

tmp_dir = tmp_dir if tmp_dir else Path(mkdtemp())

global_state instance-attribute

global_state = None

init_state async

init_state(global_state)

start_build async

start_build()

handle_file abstractmethod async

handle_file(file_path, controller, metadata)

Only direct controller views are called with (view, controller) inputs. Otherwise we do a recursive search of the raw files on disk with controller=None.

finish_build async

finish_build()