From 0dd0443dc9adee63b17d9ac2cd304bff3ab94c60 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Mon, 1 Jul 2019 21:13:44 +0200 Subject: [PATCH] explicit jupyter lab build Install the bundled extension rather than the one from npm #259 #276 --- README.md | 5 ++--- binder/postBuild | 10 ++++++++-- docs/install.md | 5 ++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 86518d739..f722c6bb4 100755 --- a/README.md +++ b/README.md @@ -84,11 +84,10 @@ In JupyterLab, Jupytext adds a set of commands to the command palette: ![JupyterLab extension](https://raw.githubusercontent.com/mwouts/jupyterlab-jupytext/master/jupytext_commands.png) -If you don't see these commands, install the extension manually with +The Jupytext extension for JupyterLab is bundled with Jupytext. Installing Jupytext will trigger a build of JupyterLab the next time you open it. If you prefer, you can trigger the build manually with ``` -jupyter labextension install jupyterlab-jupytext +jupyter lab build ``` -(the above requires `npm`, run `conda install nodejs` first if you don't have `npm`). ## Using Jupytext diff --git a/binder/postBuild b/binder/postBuild index 45cf1a493..6fdb9b96e 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -1,12 +1,18 @@ +# Stop everything if one command fails +set -e + # Install the bash kernel python -m bash_kernel.install # Trust our notebook jupyter trust demo/World\ population.ipynb -# Set up extensions for JupyterLab and Notebook -jupyter labextension install jupyterlab-jupytext +# Build jupyter lab to include the Jupytext extension +jupyter lab build # Create the notebook for our jupytext demo jupytext demo/get_started.md --to ipynb --update-metadata '{"jupytext":null}' + +# Remove the markdown representation +# the demo starts with just the ipynb file rm demo/get_started.md diff --git a/docs/install.md b/docs/install.md index d8d97e56a..46d379767 100644 --- a/docs/install.md +++ b/docs/install.md @@ -49,8 +49,7 @@ In JupyterLab, Jupytext adds a set of commands to the command palette: ![JupyterLab extension](https://raw.githubusercontent.com/mwouts/jupyterlab-jupytext/master/jupytext_commands.png) -If you don't see these commands, install the extension manually with +The Jupytext extension for JupyterLab is bundled with Jupytext. Installing Jupytext will trigger a build of JupyterLab the next time you open it. If you prefer, you can trigger the build manually with ``` -jupyter labextension install jupyterlab-jupytext +jupyter lab build ``` -(the above requires `npm`, run `conda install nodejs` first if you don't have `npm`).