Skip to content

Commit dd91871

Browse files
committed
update install instructions
1 parent 4f1b76f commit dd91871

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ When developing your extensions, you need to manually enable your extensions wit
5454
notebook / lab frontend. For lab, this is done by the command:
5555

5656
```
57-
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
58-
jupyter labextension install .
57+
jupyter labextension develop --overwrite .
58+
npm run build
5959
```
6060

6161
For classic notebook, you can run:
@@ -71,6 +71,23 @@ you might also need another flag instead of `--sys-prefix`, but we won't cover t
7171
of those flags here.
7272

7373

74+
### How to see your changes
75+
#### Typescript:
76+
If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
77+
terminals to watch for changes in the extension's source and automatically rebuild the widget.
78+
79+
```bash
80+
# Watch the source directory in one terminal, automatically rebuilding when needed
81+
npm run watch
82+
# Run JupyterLab in another terminal
83+
jupyter lab
84+
```
85+
86+
After a change wait for the build to finish and then refresh your browser and the changes should take effect.
87+
88+
#### Python:
89+
If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.
90+
7491
## Releasing your initial packages:
7592

7693
- Add tests

{{cookiecutter.github_project_name}}/README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,13 @@
1212
You can install using `pip`:
1313

1414
```bash
15-
pip install {{ cookiecutter.python_package_name }}
16-
```
17-
18-
Or if you use jupyterlab:
19-
20-
```bash
21-
pip install {{ cookiecutter.python_package_name }}
22-
jupyter labextension install @jupyter-widgets/jupyterlab-manager
15+
pip install {{ cookiecutter.python_package_name }}
2316
```
2417

2518
If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
2619
the nbextension:
2720
```bash
28-
jupyter nbextension enable --py [--sys-prefix|--user|--system] {{ cookiecutter.python_package_name }}
21+
jupyter nbextension enable --py [--sys-prefix|--user|--system] {{ cookiecutter.python_package_name }}
2922
```
3023

3124
## Development Installation
@@ -40,11 +33,11 @@ When developing your extensions, you need to manually enable your extensions wit
4033
notebook / lab frontend. For lab, this is done by the command:
4134

4235
```
43-
jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build
44-
jupyter labextension install .
36+
jupyter labextension develop --overwrite .
37+
npm run build
4538
```
4639

47-
For classic notebook, you can run:
40+
For classic notebook, you need to run:
4841

4942
```
5043
jupyter nbextension install --sys-prefix --symlink --overwrite --py {{ cookiecutter.python_package_name }}
@@ -58,13 +51,14 @@ of those flags here.
5851

5952
### How to see your changes
6053
#### 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:
54+
If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
55+
terminals to watch for changes in the extension's source and automatically rebuild the widget.
56+
6657
```bash
58+
# Watch the source directory in one terminal, automatically rebuilding when needed
6759
npm run watch
60+
# Run JupyterLab in another terminal
61+
jupyter lab
6862
```
6963

7064
After a change wait for the build to finish and then refresh your browser and the changes should take effect.

0 commit comments

Comments
 (0)