diff --git a/server-extension/README.md b/server-extension/README.md index 19fca889..75a8da48 100644 --- a/server-extension/README.md +++ b/server-extension/README.md @@ -14,6 +14,7 @@ example before diving into this one. - [Packaging the Extension](#packaging-the-extension) - [Python Package Manager](#python-package-manager) - [JupyterLab Extension Manager](#jupyterlab-extension-manager) + - [Development](#development) - [Installing the Package](#installing-the-package) ## The template folder structure @@ -565,7 +566,7 @@ done using [hatch](https://hatch.pypa.io/) builder with some additional plugins: - [hatch-jupyter-builder](https://github.com/jupyterlab/hatch-jupyter-builder/): Builder plugin to build Jupyter JavaScript assets as part of the Python package. Its configuration is done in `pyproject.toml`: -``` +```toml # pyproject.toml [build-system] @@ -758,6 +759,18 @@ And that server extension is available through `pip`: For more information on the `discovery` metadata, please refer to the [documentation](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#ext-author-companion-packages). +## Development + +While developing your server extension, you can run JupyterLab and enable server reloading using the following command: + +```bash +jupyter lab --autoreload --no-browser +``` + +This way, every time there is a change to the backend (server) code, JupyterLab is automatically relaunched, picking up the most recent changes. + +The `--no-browser` flag is optional, but it helps prevent a new browser tab from opening each time JupyterLab is launched. + ## Installing the Package With the packaging described above, installing the extension is done in one command once the package is published on pypi.org: