You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,21 +64,21 @@ pip install -e .
64
64
# Link your development version of the extension with JupyterLab
65
65
jupyter labextension develop . --overwrite
66
66
# Rebuild extension Typescript source after making changes
67
-
jlpm run build
67
+
jlpm build
68
68
```
69
69
70
70
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.
71
71
72
72
```bash
73
73
# Watch the source directory in one terminal, automatically rebuilding when needed
74
-
jlpm run watch
74
+
jlpm watch
75
75
# Run JupyterLab in another terminal
76
76
jupyter lab
77
77
```
78
78
79
79
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).
80
80
81
-
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:
81
+
By default, the `jlpm 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:
Copy file name to clipboardExpand all lines: docs/installation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ pre-commit install
48
48
# Link your development version of the extension with JupyterLab
49
49
jupyter labextension develop . --overwrite
50
50
# Rebuild extension Typescript source after making changes
51
-
jlpm run build
51
+
jlpm build
52
52
```
53
53
54
54
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.
Copy file name to clipboardExpand all lines: docs/other_extensions.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
The JupyterLab-Blockly extension is ready to be used as a base for other projects: you can register new Blocks, Toolboxes and Generators. It is a great tool for fast prototyping.
4
4
5
5
## Creating a new JupyterLab extension
6
-
You can easily create a new JupyterLab extension by using a `cookiecutter`. You can read more documentation about `cookiecutters`[here](https://cookiecutter.readthedocs.io/en/latest/), but the process is fairly straight-forward.
6
+
You can easily create a new JupyterLab extension by using a `cookiecutter`. You can read more documentation about `cookiecutters`[here](https://cookiecutter.readthedocs.io/en/latest/), but the process is fairly straight-forward.
7
7
8
8
After running the following command:
9
9
```
@@ -20,7 +20,7 @@ Firstly you need to install and add `jupyterlab-blockly` as a dependency for you
20
20
jlpm add jupyterlab-blockly
21
21
```
22
22
23
-
Once it is part of your project, all you need to do is import `IBlocklyRegistry`, as it follows:
23
+
Once it is part of your project, all you need to do is import `IBlocklyRegistry`, as it follows:
24
24
```typescript
25
25
// src/index.ts
26
26
@@ -40,7 +40,7 @@ The `IBlocklyRegistry` offers a function `registerBlocks`, which allows you to i
40
40
*
41
41
* @argumentblocks Blocks to register.
42
42
*/
43
-
registerBlocks(blocks: JSONObject[]): void {
43
+
registerBlocks(blocks: BlockDefinition[]): void {
44
44
Blockly.defineBlocksWithJsonArray(blocks);
45
45
}
46
46
```
@@ -56,7 +56,7 @@ Using the `registerToolbox` function, provided by `IBlocklyRegistry`, you can re
@@ -86,7 +86,7 @@ Lastly, `IBlocklyRegistry` offers the function `registerGenerator` which lets yo
86
86
87
87
88
88
## Example - JupyterLab-Niryo-One
89
-
The [JupyterLab-Niryo-One](https://github.com/QuantStack/jupyterlab-niryo-one/) extension was built on top of JupyterLab-Blockly and poses as the perfect example. The [Github repository](https://github.com/QuantStack/jupyterlab-niryo-one/) gives access to its entire codebase.
89
+
The [JupyterLab-Niryo-One](https://github.com/QuantStack/jupyterlab-niryo-one/) extension was built on top of JupyterLab-Blockly and poses as the perfect example. The [Github repository](https://github.com/QuantStack/jupyterlab-niryo-one/) gives access to its entire codebase.
90
90
91
91
The following code snippet showcases how to register a new toolbox, `BlocklyNiryo.Toolbox`, as `niryo`.
92
92
```typescript
@@ -158,7 +158,7 @@ You will need to request the `jupyterlab-blockly` package as a dependency of you
0 commit comments