mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-16 03:16:20 +00:00
Upgrade ihaskell_labextension to JupyterLab 2
https://jupyterlab.readthedocs.io/en/stable/developer/extension_migration.html
This commit is contained in:
parent
9708aba804
commit
e06cf7e5b8
@ -10,7 +10,7 @@
|
||||
# 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
|
||||
|
||||
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
|
||||
npm \
|
||||
&& \
|
||||
#
|
||||
# Required for upgrading nodejs
|
||||
curl \
|
||||
#
|
||||
# Clean apt install
|
||||
rm -rf /var/lib/apt/lists/* \
|
||||
&& \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
#
|
||||
# Install latest npm, which is not in Ubuntu repo
|
||||
# Because ihaskell_labextension requires npm >= 4.0
|
||||
npm install npm@latest -g \
|
||||
&& \
|
||||
&& npm install npm@latest -g \
|
||||
#
|
||||
# Clean npm install cache
|
||||
npm cache clean --force \
|
||||
&& true
|
||||
&& npm cache clean --force
|
||||
|
||||
# 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 LANGUAGE C.UTF-8
|
||||
|
4779
ihaskell_labextension/package-lock.json
generated
4779
ihaskell_labextension/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ihaskell_jupyterlab",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"description": "adds ihaskell syntax highlighting to jupyterlab",
|
||||
"keywords": [
|
||||
"jupyter",
|
||||
@ -30,17 +30,16 @@
|
||||
"watch": "tsc -w"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jupyterlab/application": "0.17.1 - 2.0.0",
|
||||
"@jupyterlab/apputils": "0.17.2 - 2.0.0",
|
||||
"@jupyterlab/docregistry": "0.17.1 - 2.0.0",
|
||||
"@jupyterlab/notebook": "0.17.1 - 2.0.0",
|
||||
"@jupyterlab/application": ">=2.0.0",
|
||||
"@jupyterlab/apputils": ">=2.0.0",
|
||||
"@jupyterlab/docregistry": ">=2.0.0",
|
||||
"@jupyterlab/notebook": ">=2.0.0",
|
||||
"@jupyterlab/services": ">=3.0.1",
|
||||
"@phosphor/disposable": "^1.1.2"
|
||||
"@lumino/disposable": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": "^2.6.1",
|
||||
"typescript": "~2.6.0",
|
||||
"webpack": "~4.12.0"
|
||||
"rimraf": "^3.0.0",
|
||||
"typescript": "~3.7.3"
|
||||
},
|
||||
"jupyterlab": {
|
||||
"extension": true
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {
|
||||
JupyterLab, JupyterLabPlugin
|
||||
JupyterFrontEnd, JupyterFrontEndPlugin
|
||||
} from '@jupyterlab/application';
|
||||
|
||||
import './codemirror-ihaskell';
|
||||
@ -9,11 +9,11 @@ import '../style/index.css';
|
||||
/**
|
||||
* Initialization data for the extension1 extension.
|
||||
*/
|
||||
const extension: JupyterLabPlugin<void> = {
|
||||
const extension: JupyterFrontEndPlugin<void> = {
|
||||
id: 'ihaskell',
|
||||
autoStart: true,
|
||||
requires: [],
|
||||
activate: (app: JupyterLab) =>
|
||||
activate: (app: JupyterFrontEnd) =>
|
||||
{
|
||||
app.serviceManager.ready
|
||||
.then(() => {defineIHaskell()});
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user