An open API service indexing awesome lists of open source software.

https://github.com/ktaletsk/jupyterlab_command_test

Sample extension showing how to add command to JupyterLab menus
https://github.com/ktaletsk/jupyterlab_command_test

example jupyterlab jupyterlab-extension tutorial

Last synced: 7 months ago
JSON representation

Sample extension showing how to add command to JupyterLab menus

Awesome Lists containing this project

README

          

# command_test

Sample extension demonstrating how to register new command and add it to command pallete, main menu and context menu

## Requirements

* JupyterLab >= 0.30.0

## Install

```bash
jupyter labextension install command_test
```

### Install

The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
`yarn` or `npm` in lieu of `jlpm` below.

```bash
# Clone the repo to your local environment
# Move to command_test directory
# Install dependencies
jlpm
# Build Typescript source
jlpm build
# Link your development version of the extension with JupyterLab
jupyter labextension link .
# Rebuild Typescript source after making changes
jlpm build
# Rebuild JupyterLab after making any changes
jupyter lab build
```

You can watch the source directory and run JupyterLab in watch mode to watch for changes in the extension's source and automatically rebuild the extension and application.

```bash
# Watch the source directory in another terminal tab
jlpm watch
# Run jupyterlab in watch mode in one terminal tab
jupyter lab --watch
```

### Uninstall

```bash
jupyter labextension uninstall command_test
```