mirror of
https://github.com/IHaskell/IHaskell.git
synced 2025-04-14 10:26:07 +00:00
jupyterlab-ihaskell: use dashes instead of multiple dots to work around cabal behaviour
This commit is contained in:
parent
eab3291ed8
commit
c475d15cec
@ -34,8 +34,7 @@
|
||||
"@jupyterlab/apputils": ">=3.0.0",
|
||||
"@jupyterlab/docregistry": ">=3.0.0",
|
||||
"@jupyterlab/notebook": ">=3.0.0",
|
||||
"@jupyterlab/services": ">=6.0.0",
|
||||
"@lumino/disposable": "^1.7.2"
|
||||
"@jupyterlab/services": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rimraf": "^3.0.0",
|
||||
@ -46,8 +45,9 @@
|
||||
"jupyterlab": {
|
||||
"extension": true,
|
||||
"outputDir": "labextension",
|
||||
"webpackConfig": "./webpack.config.js",
|
||||
"_build": {
|
||||
"load": "static/remoteEntry.9c17ba2cf8c8da4e9ea7.js",
|
||||
"load": "static/remoteEntry-ddc4c9d791a676e50bb9.js",
|
||||
"extension": "./extension"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
jupyterlab-ihaskell/package-lock.json
generated
2
jupyterlab-ihaskell/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jupyterlab-ihaskell",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -44,6 +44,7 @@
|
||||
},
|
||||
"jupyterlab": {
|
||||
"extension": true,
|
||||
"outputDir": "labextension"
|
||||
"outputDir": "labextension",
|
||||
"webpackConfig": "./webpack.config.js"
|
||||
}
|
||||
}
|
||||
|
2
jupyterlab-ihaskell/shell.nix
Normal file
2
jupyterlab-ihaskell/shell.nix
Normal file
@ -0,0 +1,2 @@
|
||||
let nixpkgs = import <nixpkgs> {};
|
||||
in nixpkgs.mkShell { buildInputs = [ (nixpkgs.python3.withPackages (p: [ p.jupyterlab ] )) nixpkgs.nodejs ]; }
|
30
jupyterlab-ihaskell/webpack.config.js
Normal file
30
jupyterlab-ihaskell/webpack.config.js
Normal file
@ -0,0 +1,30 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const packagePath = '.';
|
||||
const data = fs.readJSONSync(path.join(packagePath, 'package.json'));
|
||||
const outputPath = path.join(packagePath, data.jupyterlab['outputDir']);
|
||||
|
||||
class FixupEntryPoint {
|
||||
apply(compiler) {
|
||||
compiler.hooks.done.tap('FixupEntryPoint', (stats) => {
|
||||
|
||||
const data = fs.readJSONSync(path.join(outputPath, "package.json"));
|
||||
const remoteEntry = data.jupyterlab._build.load;
|
||||
const remoteEntryRe = /static\/remoteEntry\.(.*)\.js/;
|
||||
const remoteEntryDash = remoteEntry.replace(remoteEntryRe, "static/remoteEntry-$1.js");
|
||||
fs.moveSync(path.join(outputPath, remoteEntry), path.join(outputPath, remoteEntryDash));
|
||||
data.jupyterlab._build.load = remoteEntryDash;
|
||||
fs.writeJSONSync(path.join(outputPath, "package.json"), data, { spaces: 2 });
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
output: {
|
||||
filename: "[name]-[contenthash].js"
|
||||
},
|
||||
plugins: [
|
||||
new FixupEntryPoint()
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user