Skip to content

Commit 5cb5fcc

Browse files
committed
update dev install instructions for jlab3
1 parent 76a6547 commit 5cb5fcc

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

README.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,26 +48,40 @@ is used instead.
4848

4949
```bash
5050
# Create a new conda environment
51-
conda create -n jupyterlab-sidecar -c conda-forge jupyterlab ipywidgets nodejs
51+
conda create -n jupyterlab-sidecar -c conda-forge jupyterlab ipywidgets nodejs -y
5252

5353
# Activate the conda environment
5454
conda activate jupyterlab-sidecar
5555

56-
# Install dependencies
57-
jlpm
58-
59-
# Build Typescript source
60-
jlpm build
56+
# Install package in development mode
57+
pip install -e .
6158

6259
# Link your development version of the extension with JupyterLab
63-
jupyter labextension link .
60+
jupyter labextension develop . --overwrite
61+
62+
# Rebuild extension Typescript source after making changes
63+
jlpm run build
64+
```
65+
You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
66+
67+
```bash
68+
# Watch the source directory in one terminal, automatically rebuilding when needed
69+
jlpm run watch
70+
# Run JupyterLab in another terminal
71+
jupyter lab
72+
```
6473

65-
# Rebuild Typescript source after making changes
66-
jlpm build
6774

68-
# Rebuild JupyterLab after making any changes
69-
jupyter lab build
75+
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
76+
77+
By default, the jlpm run build command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
78+
79+
```bash
80+
jupyter lab build --minimize=False
81+
```
82+
83+
## Uninstall
7084

71-
# Install the sidecar Python package
72-
python -m pip install -e .
7385
```
86+
pip uninstall jupyterlab-sidecar
87+
```

0 commit comments

Comments
 (0)