@@ -27,3 +27,47 @@ the nbextension:
27
27
``` bash
28
28
jupyter nbextension enable --py [--sys-prefix| --user| --system] {{ cookiecutter.python_package_name }}
29
29
```
30
+
31
+ ## Development Installation
32
+
33
+
34
+ ``` bash
35
+ # First install the python package. This will also build the JS packages.
36
+ pip install -e " .[test, examples]"
37
+ ```
38
+
39
+ When developing your extensions, you need to manually enable your extensions with the
40
+ notebook / lab frontend. For lab, this is done by the command:
41
+
42
+ ```
43
+ jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
44
+ jupyter labextension install .
45
+ ```
46
+
47
+ For classic notebook, you can run:
48
+
49
+ ```
50
+ jupyter nbextension install --sys-prefix --symlink --overwrite --py <your python package name>
51
+ jupyter nbextension enable --sys-prefix --py <your python package name>
52
+ ```
53
+
54
+ Note that the ` --symlink ` flag doesn't work on Windows, so you will here have to run
55
+ the ` install ` command every time that you rebuild your extension. For certain installations
56
+ you might also need another flag instead of ` --sys-prefix ` , but we won't cover the meaning
57
+ of those flags here.
58
+
59
+ ### How to see your changes
60
+ #### Typescript:
61
+ To continuously monitor the project for changes and automatically trigger a rebuild, start Jupyter in watch mode:
62
+ ``` bash
63
+ jupyter lab --watch
64
+ ```
65
+ And in a separate session, begin watching the source directory for changes:
66
+ ``` bash
67
+ npm run watch
68
+ ```
69
+
70
+ After a change wait for the build to finish and then refresh your browser and the changes should take effect.
71
+
72
+ #### Python:
73
+ If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.
0 commit comments