As an example: Add a leaflet viewer plugin for geoJSON files.
jupyterlab
top level source directory: npm install --save leaflet
. This adds the file to the dependencies
in package.json
.tsd
node package globally, in order to fetch typings
files: npm install -g tsd
.tsd install 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 npm run build
from jupyterlab/jupyterlab
Run jupyter lab
and verify changes.