Skip to content

Commit

Permalink
Changes to make extension work with jupyterlab v1
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolmirosa committed Jul 16, 2019
1 parent e09938f commit e57d480
Show file tree
Hide file tree
Showing 44 changed files with 197 additions and 731 deletions.
38 changes: 17 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"lib/*.d.ts",
"lib/*.js.map",
"lib/*.js",
"static/index.css",
"static/*.ttf"
"style/*"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -25,36 +24,33 @@
"url": "https://github.com/oriolmirosa/jupyterlab_materialdarker.git"
},
"scripts": {
"build": "run-p build:**",
"build:typescript": "tsc",
"build": "tsc -b",
"build:webpack": "webpack",
"clean": "rimraf lib",
"prepublishOnly": "npm run build",
"watch": "run-p watch:**",
"watch:typescript": "tsc -w",
"clean": "rimraf lib && rimraf static",
"prepare": "npm run clean && npm run build",
"watch": "tsc -w",
"watch:webpack": "webpack --watch"
},
"dependencies": {
"@jupyterlab/application": "^0.19.1",
"@jupyterlab/apputils": "^0.19.1",
"font-awesome": "~4.7.0",
"npm": "^5.7.1",
"style-loader": "^0.20.3"
"@jupyterlab/application": "^1.0.0",
"@jupyterlab/apputils": "^1.0.0"
},
"devDependencies": {
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~2.1.2",
"npm-run-all": "~4.1.1",
"rimraf": "~2.6.2",
"svg-url-loader": "~2.3.1",
"typedoc": "~0.12.0",
"typescript": "~3.3.1",
"css-loader": "~0.28.7",
"mini-css-extract-plugin": "~0.4.4",
"svgo": "~1.0.4",
"svg-url-loader": "~2.3.1",
"svgo-loader": "~2.1.0",
"typescript": "~2.6.2",
"url-loader": "~0.5.9",
"webpack": "~2.7.0"
"url-loader": "~1.0.1",
"watch": "~1.0.2",
"webpack": "~4.12.0",
"webpack-cli": "^3.0.3"
},
"jupyterlab": {
"extension": true,
"themeDir": "static"
"themePath": "style/index.css"
}
}
17 changes: 8 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

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

import {
Expand All @@ -11,19 +12,17 @@ import {
/**
* A plugin for the MaterialDarker theme for JupyterLab
*/
const plugin: JupyterLabPlugin<void> = {
const plugin: JupyterFrontEndPlugin<void> = {
id: 'MaterialDarker:plugin',
requires: [IThemeManager],
activate: function(app: JupyterLab, manager: IThemeManager) {
activate: function (app: JupyterFrontEnd, manager: IThemeManager) {
const style = '@oriolmirosa/jupyterlab_materialdarker/index.css';

manager.register({
name: 'Material Darker',
isLight: false,
load: function() {
return manager.loadCSS('@oriolmirosa/jupyterlab_materialdarker/index.css');
},
unload: function() {
return Promise.resolve(void 0);
}
load: () => manager.loadCSS(style),
unload: () => Promise.resolve(undefined)
});
},
autoStart: true
Expand Down
12 changes: 12 additions & 0 deletions style/icons/jupyter/console_selected.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 0 additions & 84 deletions style/icons/jupyter/directory.svg

This file was deleted.

84 changes: 0 additions & 84 deletions style/icons/jupyter/directory_selected.svg

This file was deleted.

83 changes: 0 additions & 83 deletions style/icons/jupyter/launcher.svg

This file was deleted.

Loading

0 comments on commit e57d480

Please sign in to comment.