betty.extension.npm package

Module contents

Provide tools to integrate extensions with npm.

This extension and module are internal.

async betty.extension.npm.build_assets(extension)[source]

Build the npm assets for an extension.

Parameters:
extension

Return type:

Path

betty.extension.npm.discover_npm_builders()[source]

Gather all extensions that are npm builders.

Return type:

set[type[_NpmBuilder & Extension]]

betty.extension.npm.is_assets_build_directory_path(path)[source]

Check if the given path is an assets build directory path.

Parameters:
path

Return type:

bool

async betty.extension.npm.npm(arguments, cwd=None)[source]

Run an npm command.

Parameters:
arguments

cwd=None

Return type:

asyncio.subprocess.Process