Browse Source

Update import in tutorial

Initially when you make the cookiecutter there is the following import at the top of the file:

```
import {
  JupyterLab, JupyterLabPlugin
} from '@jupyterlab/application';
```

which needs to be changed to 

```
import {
      JupyterFrontEnd, JupyterFrontEndPlugin
    } from '@jupyterlab/application';
```

in order to make the extension work at this point in the tutorial.
Nicolas Scozzaro 5 years ago
parent
commit
7312d26320
1 changed files with 9 additions and 4 deletions
  1. 9 4
      docs/source/developer/extension_tutorial.rst

+ 9 - 4
docs/source/developer/extension_tutorial.rst

@@ -209,22 +209,27 @@ you in JupyterLab. For your first addition, you're going to add a
 tab panel when invoked.
 tab panel when invoked.
 
 
 Fire up your favorite text editor and open the ``src/index.ts`` file in
 Fire up your favorite text editor and open the ``src/index.ts`` file in
-your extension project. Add the following import at the top of the file
-to get a reference to the command palette interface.
+your extension project. Change the import at the top of the file to get 
+a reference to the command palette interface and the Jupyter front end.
 
 
 .. code:: typescript
 .. code:: typescript
-
+    
+    import {
+      JupyterFrontEnd, JupyterFrontEndPlugin
+    } from '@jupyterlab/application';
+    
     import {
     import {
       ICommandPalette
       ICommandPalette
     } from '@jupyterlab/apputils';
     } from '@jupyterlab/apputils';
 
 
-You will also need to install this dependency. Run the following command in the
+You will also need to install these dependencies. Run the following commands in the
 repository root folder install the dependency and save it to your
 repository root folder install the dependency and save it to your
 `package.json`:
 `package.json`:
 
 
 .. code:: bash
 .. code:: bash
 
 
     jlpm add @jupyterlab/apputils
     jlpm add @jupyterlab/apputils
+    jlpm add @jupyterlab/application
 
 
 Locate the ``extension`` object of type ``JupyterFrontEndPlugin``. Change the
 Locate the ``extension`` object of type ``JupyterFrontEndPlugin``. Change the
 definition so that it reads like so:
 definition so that it reads like so: