As an example: Add a leaflet viewer plugin for geoJSON files.
jupyterlab
top level source directory: jlpm add leaflet
. This adds the file to the dependencies
in package.json
.jlpm add --dev @types/leaflet
. Success!src/typings.d.ts
.src
for the plugin.index.ts
and plugin.ts
files.src/default-themes/index.css
.index.ts
file should have the core logic for the plugin. In
this case, it should create a widget and widget factory for rendering geojson
files (see Documents).The plugin.ts
file should create the extension and add the content
to the application. In this case registering the widget factory using
the document registry.
Run jlpm run build
from jupyterlab/jupyterlab
Run jupyter lab
and verify changes.