Skip to content

jupyterlab/jupyter-builder

Jupyter Builder

Build version on npm version on PyPI version on conda-forge

Build tools for JupyterLab extensions — extracted from the core JupyterLab codebase to be maintained and used independently.

Installation

pip install jupyter_builder

CLI

build

Compile the extension JavaScript assets for consumption by a Jupyter app.

jupyter-builder build <path/to/extension>

develop

Install extension assets in development mode (analogous to pip install -e). Uses a symlink by default.

jupyter-builder develop <path/to/extension>

watch

Automatically rebuild development assets when source files change.

jupyter-builder watch <path/to/extension>

For advanced configuration, see the Advanced section for available flags.

jlpm

jupyter-builder ships jlpm, a Jupyter-aware Node.js package manager wrapper:

jlpm install
jlpm build

Advanced

CLI flags

build
Flag Description
--development Build in development mode (default: False)
--source-map Generate source maps (default: False)
--static-url=<url> Set the URL for static assets
--core-version=<version> JupyterLab core version to build against
--core-package-file=<path> Path to a core application package.json (overrides --core-version)
develop
Flag Description
--overwrite Overwrite existing files
--user Install to the user's directory
--sys-prefix Install under sys.prefix (default: True)
--labextensions-dir=<path> Install to a custom labextensions directory
watch
Flag Description
--development Build in development mode (default: True)
--source-map Generate source maps (default: False)
--core-version=<version> JupyterLab core version to build against
--core-package-file=<path> Path to a core application package.json (overrides --core-version)

Python API

from jupyter_builder.federated_extensions import (
    build_labextension,
    develop_labextension_py,
    watch_labextension,
)

build_labextension(
    "/path/to/extension",
    development=False,
    source_map=False,
    static_url=None,
    core_version=None,
    core_package_file=None,
)

develop_labextension_py(
    "/path/to/extension",
    overwrite=True,
    symlink=True,
    user=False,
    sys_prefix=True,
)

watch_labextension(
    "/path/to/extension",
    labextensions_path=[...],
    development=True,
    source_map=False,
)

Uninstall

pip uninstall jupyter_builder

Credits

This package was initially created during GSoC 2024 by @cronan03, mentored by @fcollonval.

About

Build tools for JupyterLab (and remixes)

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors