A monorepo containing jupyter-blocks and jupyter-tidyblocks. Blockly extension for JupyterLab.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #65 from DenisaCG/docs

Update docs on other extensions category

authored by

Denisa Checiu and committed by
GitHub
3573e986 6667d0e2

+34
+34
docs/other_extensions.md
··· 147 147 ``` 148 148 jlpm add patch-package 149 149 ``` 150 + 151 + ## Additional configurations 152 + 153 + You will need to request the `jupyterlab-blockly` package as a dependency of your extension, in order to ensure it is installed and available to provide the token `IBlocklyRegistry`. To do this, you need to add the following line to your `setup.py` file. 154 + 155 + ```python 156 + // setup.py : 57 157 + 158 + setup_args = dict( 159 + ... 160 + install_requires=['jupyterlab-blockly>=0.1.1,<0.2'] 161 + ... 162 + ) 163 + ``` 164 + 165 + Moreover, as we are working with deduplication of dependencies and the extension you are creating requires a service identified by a token from `jupyterlab-blockly`, you need to add the following configuration to your `package.json` file. 166 + 167 + ``` 168 + // package.json : 88-101 169 + 170 + "jupyterlab": { 171 + "sharedPackages": { 172 + "jupyterlab-blockly": { 173 + "bundled": false, 174 + "singleton": true 175 + }, 176 + "blockly": { 177 + "bundled": false, 178 + "singleton": true 179 + } 180 + } 181 + } 182 + ``` 183 + This ensures your extension will get the exact same token the provider is using to identify the service and exclude it from its bundle as the provider will give a copy of the token. You can read more about deduplication of dependencies [here](https://jupyterlab.readthedocs.io/en/stable/extension/extension_dev.html#deduplication-of-dependencies), in the official *Extension Developer Guide for JupyterLab*.