Skip to content

Commit da1b81b

Browse files
committed
added instruction about adding patches
1 parent 3a94405 commit da1b81b

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

docs/other_extensions.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,42 @@ const plugin: JupyterFrontEndPlugin<void> = {
108108
};
109109
```
110110

111-
**NOTE** : `BlocklyNiryo` is defined in `niryo-one-python-generators.ts`.
111+
**NOTE** : `BlocklyNiryo` is defined in `niryo-one-python-generators.ts`.
112+
113+
114+
## Include patches
115+
Currently, for the extension to work, you will need to include the following patch from the JupyterLab-Blockly extension (make sure it is placed in a file named `@jupyterlab+codeeditor+3.4.3.patch`, inside the `patches` folder):
116+
117+
```
118+
// patches/@jupyterlab+codeeditor+3.4.3.patch
119+
120+
diff --git a/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts b/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts
121+
index ffe8d1f..d63b2f8 100644
122+
--- a/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts
123+
+++ b/node_modules/@jupyterlab/codeeditor/lib/editor.d.ts
124+
@@ -44,7 +44,7 @@ export declare namespace CodeEditor {
125+
/**
126+
* An interface describing editor state coordinates.
127+
*/
128+
- interface ICoordinate extends JSONObject, ClientRect {
129+
+ interface ICoordinate extends JSONObject {
130+
}
131+
/**
132+
* A range.
133+
```
134+
135+
You will also need to modify the `MANIFEST.in` file:
136+
```
137+
recursive-include patches *.patch
138+
```
139+
the `package.json` file:
140+
```
141+
"scripts": {
142+
...
143+
"postinstall": "patch-package"
144+
}
145+
````
146+
and, finally, add `patch-package` as a dependency:
147+
```
148+
jlpm add patch-package
149+
```

0 commit comments

Comments
 (0)