Unverified Commit 6063c58c authored by Vaibhav Sagar's avatar Vaibhav Sagar Committed by GitHub

Merge pull request #1151 from jamesdbrock/labextension-jlab2

Upgrade ihaskell_labextension to JupyterLab 2
parents 3bfc2d88 e06cf7e5
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# docker build --build-arg BASE_CONTAINER=ubuntu:16.04 -t ihaskell-dev . # docker build --build-arg BASE_CONTAINER=ubuntu:16.04 -t ihaskell-dev .
# #
ARG BASE_CONTAINER=ubuntu:bionic-20180526@sha256:c8c275751219dadad8fa56b3ac41ca6cb22219ff117ca98fe82b42f24e1ba64e ARG BASE_CONTAINER=ubuntu:bionic-20200219@sha256:0925d086715714114c1988f7c947db94064fd385e171a63c07730f1fa014e6f9
FROM $BASE_CONTAINER FROM $BASE_CONTAINER
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
...@@ -40,20 +40,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ...@@ -40,20 +40,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# #
# Required for building ihaskell_labextension # Required for building ihaskell_labextension
npm \ npm \
&& \ #
# Required for upgrading nodejs
curl \
# #
# Clean apt install # Clean apt install
rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& \
# #
# Install latest npm, which is not in Ubuntu repo # Install latest npm, which is not in Ubuntu repo
# Because ihaskell_labextension requires npm >= 4.0 # Because ihaskell_labextension requires npm >= 4.0
npm install npm@latest -g \ && npm install npm@latest -g \
&& \
# #
# Clean npm install cache # Clean npm install cache
npm cache clean --force \ && npm cache clean --force
&& true
# Setup nodejs repository
# https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions
# Need nodejs later than 8.16.2 for jupyterlab 2.0.2 → rendermime → marked 0.8.0
# Otherwise when we build ihaskell_labextension we get errors like this:
#
# ihaskell_labextension $ npm install
# npm WARN notsup Unsupported engine for marked@0.8.2: wanted: {"node":">= 8.16.2"} (current: {"node":"8.10.0","npm":"6.14.4"})
#
RUN curl -sL https://deb.nodesource.com/setup_13.x | bash - \
&& apt-get install -y nodejs \
#
# Clean apt install
&& rm -rf /var/lib/apt/lists/*
ENV LANG C.UTF-8 ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8 ENV LANGUAGE C.UTF-8
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "ihaskell_jupyterlab", "name": "ihaskell_jupyterlab",
"version": "0.0.6", "version": "0.0.7",
"description": "adds ihaskell syntax highlighting to jupyterlab", "description": "adds ihaskell syntax highlighting to jupyterlab",
"keywords": [ "keywords": [
"jupyter", "jupyter",
...@@ -30,17 +30,16 @@ ...@@ -30,17 +30,16 @@
"watch": "tsc -w" "watch": "tsc -w"
}, },
"dependencies": { "dependencies": {
"@jupyterlab/application": "0.17.1 - 2.0.0", "@jupyterlab/application": ">=2.0.0",
"@jupyterlab/apputils": "0.17.2 - 2.0.0", "@jupyterlab/apputils": ">=2.0.0",
"@jupyterlab/docregistry": "0.17.1 - 2.0.0", "@jupyterlab/docregistry": ">=2.0.0",
"@jupyterlab/notebook": "0.17.1 - 2.0.0", "@jupyterlab/notebook": ">=2.0.0",
"@jupyterlab/services": ">=3.0.1", "@jupyterlab/services": ">=3.0.1",
"@phosphor/disposable": "^1.1.2" "@lumino/disposable": "^1.1.2"
}, },
"devDependencies": { "devDependencies": {
"rimraf": "^2.6.1", "rimraf": "^3.0.0",
"typescript": "~2.6.0", "typescript": "~3.7.3"
"webpack": "~4.12.0"
}, },
"jupyterlab": { "jupyterlab": {
"extension": true "extension": true
......
import { import {
JupyterLab, JupyterLabPlugin JupyterFrontEnd, JupyterFrontEndPlugin
} from '@jupyterlab/application'; } from '@jupyterlab/application';
import './codemirror-ihaskell'; import './codemirror-ihaskell';
...@@ -9,11 +9,11 @@ import '../style/index.css'; ...@@ -9,11 +9,11 @@ import '../style/index.css';
/** /**
* Initialization data for the extension1 extension. * Initialization data for the extension1 extension.
*/ */
const extension: JupyterLabPlugin<void> = { const extension: JupyterFrontEndPlugin<void> = {
id: 'ihaskell', id: 'ihaskell',
autoStart: true, autoStart: true,
requires: [], requires: [],
activate: (app: JupyterLab) => activate: (app: JupyterFrontEnd) =>
{ {
app.serviceManager.ready app.serviceManager.ready
.then(() => {defineIHaskell()}); .then(() => {defineIHaskell()});
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment