Skip to content

Commit 84f29fc

Browse files
fcollonvaljtpio
andauthored
Add install script (#104)
* Add install script * Remove link command usage * Update basics/hello-world/README.md Co-authored-by: Jeremy Tuloup <[email protected]>
1 parent 616ee92 commit 84f29fc

File tree

24 files changed

+36
-33
lines changed

24 files changed

+36
-33
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
run: |
7373
cd ${EXAMPLE_FOLDER}
7474
jlpm run build
75-
jupyter labextension link .
75+
jupyter labextension install .
7676
python -m jupyterlab.browser_check
7777
env:
7878
EXAMPLE_FOLDER: ${{ matrix.example }}
@@ -140,7 +140,7 @@ jobs:
140140
cd advanced/server-extension
141141
pip install -e .
142142
jupyter serverextension enable --py jlab_ext_example
143-
jupyter labextension link .
143+
jupyter labextension install .
144144
- name: Check extension as dev
145145
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
146146
run: |
@@ -176,5 +176,5 @@ jobs:
176176
run: |
177177
jlpm build-ext
178178
jlpm lint:check
179-
jlpm link-ext
179+
jlpm install-ext
180180
jlpm build-jlab

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ git clone https://github.com/jupyterlab/extension-examples.git jupyterlab-extens
1717
cd basics/hello-world && \
1818
jlpm && \
1919
jlpm run build && \
20-
jupyter labextension link . && \
20+
jupyter labextension install . && \
2121
jupyter lab
2222
```
2323

@@ -205,12 +205,12 @@ conda env create && \
205205
206206
## Develop and Use the Examples
207207

208-
### Build and Link all Examples at once
208+
### Build and Install all Examples at once
209209

210210
```bash
211211
jlpm
212212
jlpm build-ext
213-
jlpm link-ext
213+
jlpm install-ext
214214
jlpm build-jlab
215215
jupyter lab
216216
```
@@ -221,14 +221,14 @@ To clean the lib folders:
221221
jlpm clean-ext
222222
```
223223

224-
### Build and Link one Example
224+
### Build and Install one Example
225225

226226
Go to the example directory you want to install, e.g. `cd ./basics/hello-world`, and run the following commands:
227227

228228
```bash
229229
jlpm install
230230
jlpm run build
231-
jupyter labextension link .
231+
jupyter labextension install .
232232
```
233233

234234
Rebuild the JupyterLab application:

advanced/kernel-messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"clean": "rimraf lib tsconfig.tsbuildinfo",
30-
"link": "jupyter labextension link . --no-build",
30+
"install-ext": "jupyter labextension install . --no-build",
3131
"prepare": "jlpm run clean && jlpm run build",
3232
"eslint": "eslint . --ext .ts,.tsx --fix",
3333
"eslint:check": "eslint . --ext .ts,.tsx",

advanced/kernel-output/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"clean": "rimraf lib tsconfig.tsbuildinfo",
30-
"link": "jupyter labextension link . --no-build",
30+
"install-ext": "jupyter labextension install . --no-build",
3131
"prepare": "jlpm run clean && jlpm run build",
3232
"eslint": "eslint . --ext .ts,.tsx --fix",
3333
"eslint:check": "eslint . --ext .ts,.tsx",

advanced/server-extension/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,8 @@ jupyter serverextension enable --py jlab_ext_example
712712
jlpm
713713
# Build Typescript source
714714
jlpm build
715-
# Link your development version of the extension with JupyterLab
716-
jupyter labextension link .
715+
# Install your development version of the extension with JupyterLab
716+
jupyter labextension install .
717717

718718
# Rebuild Typescript source after making changes
719719
jlpm build

advanced/server-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
3636
"eslint": "eslint . --ext .ts,.tsx --fix",
3737
"eslint:check": "eslint . --ext .ts,.tsx",
38-
"link": "jupyter labextension link . --no-build",
38+
"install-ext": "jupyter labextension install . --no-build",
3939
"prepare": "jlpm run clean && jlpm run build",
4040
"watch": "tsc -w"
4141
},

basics/datagrid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"clean": "rimraf lib tsconfig.tsbuildinfo",
30-
"link": "jupyter labextension link . --no-build",
30+
"install-ext": "jupyter labextension install . --no-build",
3131
"prepare": "jlpm run clean && jlpm run build",
3232
"eslint": "eslint . --ext .ts,.tsx --fix",
3333
"eslint:check": "eslint . --ext .ts,.tsx",

basics/hello-world/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ These are the instructions on how your extension can be installed for developmen
156156
jlpm
157157
# Build Typescript source
158158
jlpm build
159-
# Link your development version of the extension with JupyterLab
160-
jupyter labextension link .
159+
# Install your development version of the extension with JupyterLab
160+
jupyter labextension install .
161161
```
162162
163163
The first command installs the dependencies that are specified in
@@ -166,7 +166,10 @@ components that you want to use in your project.
166166
167167
The second step runs the build script. In this step, the TypeScript code gets
168168
converted to javascript using the compiler `tsc` and stored in a `lib`
169-
directory. Finally, the module is linked to JupyterLab.
169+
directory. Finally, the module is installed into JupyterLab.
170+
171+
> There is also a `jupyter labextension link <path>` command. It can be used to
172+
> install packages but not consider them as extensions (more information in [that discussion](https://discourse.jupyter.org/t/about-jupyter-labextension-link-v-s-install))
170173
171174
After all of these steps are done, running `jupyter labextension list` should
172175
show something like:

basics/hello-world/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"clean": "rimraf lib tsconfig.tsbuildinfo",
30-
"link": "jupyter labextension link . --no-build",
30+
"install-ext": "jupyter labextension install . --no-build",
3131
"prepare": "jlpm run clean && jlpm run build",
3232
"eslint": "eslint . --ext .ts,.tsx --fix",
3333
"eslint:check": "eslint . --ext .ts,.tsx",

basics/signals/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"scripts": {
2828
"build": "tsc",
2929
"clean": "rimraf lib tsconfig.tsbuildinfo",
30-
"link": "jupyter labextension link . --no-build",
30+
"install-ext": "jupyter labextension install . --no-build",
3131
"prepare": "jlpm run clean && jlpm run build",
3232
"eslint": "eslint . --ext .ts,.tsx --fix",
3333
"eslint:check": "eslint . --ext .ts,.tsx",

0 commit comments

Comments
 (0)