Skip to content

Commit e97179b

Browse files
committed
Fix for JupyterLab 2
1 parent d4c6967 commit e97179b

File tree

4 files changed

+523
-646
lines changed

4 files changed

+523
-646
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@
2929
"url": "https://github.com/QuantStack/ipygany"
3030
},
3131
"scripts": {
32-
"build": "yarn run build:lib && yarn run build:nbextension && yarn run build:labextension",
32+
"build": "yarn run build:lib && yarn run build:nbextension",
3333
"build:labextension": "jupyter labextension build .",
3434
"build:labextension:dev": "jupyter labextension build --development True .",
35+
"build:extensions": "yarn run build && yarn run build:labextension",
3536
"build:lib": "tsc",
3637
"build:nbextension": "webpack",
3738
"clean": "yarn run clean:lib && yarn run clean:nbextension && yarn run clean:labextension",
@@ -46,10 +47,8 @@
4647
},
4748
"dependencies": {
4849
"@jupyter-widgets/base": "^1.1.10 || ^2 || ^3 || ^4.0.0",
49-
"@jupyter-widgets/controls": "^2.0.0",
5050
"binary-search-tree": "^0.2.6",
5151
"ganyjs": "^0.6.3",
52-
"process": "^0.11.10",
5352
"three": "^0.118.0",
5453
"util": "^0.12.3",
5554
"uuid": "^3.3.3"

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,15 @@
4646
}
4747

4848
data_files_spec = [
49-
('share/jupyter/nbextensions/ipygany',
50-
nb_path, '*.*'),
49+
('share/jupyter/nbextensions/ipygany', nb_path, '**'),
5150
("share/jupyter/labextensions/ipygany", lab_path, "**"),
5251
('etc/jupyter/nbconfig/notebook.d', HERE, 'ipygany.json')
5352
]
5453

5554

5655
cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec, data_files_spec=data_files_spec)
5756
js_command = combine_commands(
58-
install_npm(HERE, build_cmd='build'),
57+
install_npm(HERE, npm=["yarn"], build_cmd='build:extensions'),
5958
ensure_targets(jstargets),
6059
)
6160

webpack.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ const resolve = {
1616
// Add '.ts' and '.tsx' as resolvable extensions.
1717
extensions: [".webpack.js", ".web.js", ".ts", ".js"],
1818
fallback: {
19-
"util": require.resolve("util/"),
20-
"process": require.resolve("process/browser")
19+
"util": require.resolve("util/")
2120
}
2221
};
2322

23+
const plugins = [
24+
new webpack.DefinePlugin({
25+
'process.env.NODE_DEBUG': JSON.stringify(false)
26+
})
27+
];
28+
29+
2430
module.exports = [
2531
/**
2632
* Notebook extension
@@ -42,6 +48,7 @@ module.exports = [
4248
devtool: 'source-map',
4349
externals,
4450
resolve,
51+
plugins
4552
},
4653

4754
/**
@@ -69,6 +76,7 @@ module.exports = [
6976
},
7077
externals,
7178
resolve,
79+
plugins
7280
}
7381

7482
];

0 commit comments

Comments
 (0)