Skip to content

Commit a87935c

Browse files
authored
Update instructions in README.md
1 parent 0cf7c4a commit a87935c

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

README.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,48 +57,69 @@ And edit them again!
5757

5858
## Install
5959

60-
Note: You will need NodeJS to install the extension.
60+
For JupyterLab 3+:
6161

6262
```bash
6363
pip install jupyterlab-interactive-dashboard-editor
64+
```
65+
66+
For JupyterLab 2.x:
67+
68+
```bash
69+
jupyter labextension install jupyterlab-interactive-dashboard-editor
6470
jupyter lab build
6571
```
6672

67-
### Install
73+
Note: You will need NodeJS to install the extension for JupterLab 2.x.
74+
75+
## Contributing
76+
77+
### Development install
78+
79+
Note: You will need NodeJS to build the extension package.
6880

6981
The `jlpm` command is JupyterLab's pinned version of
7082
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
7183
`yarn` or `npm` in lieu of `jlpm` below.
7284

7385
```bash
7486
# Clone the repo to your local environment
75-
# Move to jupyterlab-interactive-dashboard-editor directory
76-
77-
# Install dependencies
78-
jlpm
79-
# Build Typescript source
80-
jlpm build
87+
# Change directory to the {{ cookiecutter.python_name }} directory
88+
# Install package in development mode
89+
pip install -e .
8190
# Link your development version of the extension with JupyterLab
82-
jupyter labextension install .
83-
# Rebuild Typescript source after making changes
84-
jlpm build
85-
# Rebuild JupyterLab after making any changes
86-
jupyter lab build
91+
jupyter labextension develop . --overwrite
92+
# Rebuild extension Typescript source after making changes
93+
jlpm run build
8794
```
8895

89-
You can watch the source directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.
96+
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.
9097

9198
```bash
92-
# Watch the source directory in another terminal tab
93-
jlpm watch
94-
# Run jupyterlab in watch mode in one terminal tab
95-
jupyter lab --watch
99+
# Watch the source directory in one terminal, automatically rebuilding when needed
100+
jlpm run watch
101+
# Run JupyterLab in another terminal
102+
jupyter lab
96103
```
97104

98-
Now every change will be built locally and bundled into JupyterLab. Be sure to refresh your browser page after saving file changes to reload the extension (note: you'll need to wait for webpack to finish, which can take 10s+ at times).
105+
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).
106+
107+
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:
108+
109+
```bash
110+
jupyter lab build --minimize=False
111+
```
99112

100113
### Uninstall
101114

115+
For JupyterLab 3+:
116+
117+
```bash
118+
pip uninstall -interactive-dashboard-editor
119+
```
120+
121+
For JupyterLab 2.x:
122+
102123
```bash
103124
jupyter labextension uninstall jupyterlab-interactive-dashboard-editor
104125
```

0 commit comments

Comments
 (0)