l.s.u.j.j.Builder : class documentation

Part of lp.scripts.utilities.js.jsbuild View In Hierarchy

No class docstring
Method __init__ Create a new Builder.
Method log Undocumented
Method fail An error was encountered, abort build.
Method ensure_build_directory Make sure that the named relative path is a directory.
Method ensure_link Make sure that src is linked to dst.
Method build_assets Build a component's "assets" directory.
Method link_directory_content Link all the files in src_dir into target_dir.
Method build_skin Build a skin for a particular component.
Method update_combined_css_skins Create one combined CSS file per skin.
Method do_build Undocumented
def __init__(self, name='launchpad', build_dir=BUILD_DIR, src_dir=DEFAULT_SRC_DIR, extra_files=None):
Create a new Builder.
ParametersnameThe name of the package we are building. This will be used to compute the standalone JS and CSS files.
build_dirThe directory containing the build tree.
src_dirThe directory containing the source files.
extra_filesList of files that should be bundled in the standalone file.
def log(self, msg):
Undocumented
def fail(self, msg):
An error was encountered, abort build.
def ensure_build_directory(self, path):
Make sure that the named relative path is a directory.
def ensure_link(self, src, dst):
Make sure that src is linked to dst.
def build_assets(self, component_name):
Build a component's "assets" directory.
def link_directory_content(self, src_dir, target_dir, link_filter=None):
Link all the files in src_dir into target_dir.

This doesn't recurse into subdirectories, but will happily link subdirectories. It also skips linking backup files.

Parameterslink_filterA callable taking the source file as a parameter. If the filter returns False, no symlink will be created. By default a symlink is created for everything.
def build_skin(self, component_name, skin_name):
Build a skin for a particular component.
def update_combined_css_skins(self):
Create one combined CSS file per skin.
def do_build(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.