Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyterlab plugin ipywidget #222

Merged
merged 3 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/perspective-jupyterlab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "npm-run-all test:build test:run",
"test:build": "echo \"No Tests\"",
"test:run": "echo \"No Tests\"",
"build": "webpack --color --config src/config/plugin.config.js",
"build": "webpack --color --config src/config/plugin.config.js && webpack --color --config src/config/mimerenderer.config.js",
"clean": "rimraf build"
},
"dependencies": {
Expand All @@ -33,10 +33,13 @@
"@jpmorganchase/perspective-viewer-highcharts": "^0.1.18",
"@jpmorganchase/perspective-viewer-hypergrid": "^0.1.18",
"@jupyterlab/application": "^0.18.0",
"@jupyterlab/apputils": "^0.18.0",
"@jupyterlab/rendermime-interfaces": "^1.1.0",
"@jupyterlab/services": "^3.1.0",
"@jupyter-widgets/base": "^1.1.10",
"@phosphor/messaging": "^1.2.2",
"@phosphor/widgets": "^1.5.0",
"@phosphor/application": "^1.5.0",
"@types/socket.io-client": "^1.4.0",
"socket.io": "2.0.3"
},
Expand All @@ -59,12 +62,12 @@
"rimraf": "^2.6.2",
"style-loader": "^0.18.2",
"ts-loader": "^3.5.0",
"typescript": "~2.6.2",
"typescript": "~2.9.2",
"uglifyjs-webpack-plugin": "^0.4.6",
"webpack": "^3.5.6",
"worker-loader": "~1.1.1"
},
"jupyterlab": {
"mimeExtension": true
"extension": "build/index.js"
}
}
39 changes: 39 additions & 0 deletions packages/perspective-jupyterlab/src/config/mimerenderer.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/

const path = require('path');
const common = require('@jpmorganchase/perspective/src/config/common.config.js');

const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const webpack = require('webpack');

const plugins = [
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /(en|es|fr)$/)
];

if (!process.env.PSP_NO_MINIFY && !process.env.PSP_DEBUG) {
plugins.push(new UglifyJSPlugin({
sourceMap: false,
mangle: false,
output: {
ascii_only: true
}
}));
}
module.exports = Object.assign({}, common(), {
entry: './src/ts/mimerenderer.ts',
plugins: plugins,
output: {
filename: 'mime.js',
libraryTarget: "umd",
path: path.resolve(__dirname, '../../build')
}
});

module.exports.module.rules.push({test: /\.ts?$/, loader: "ts-loader"})
3 changes: 2 additions & 1 deletion packages/perspective-jupyterlab/src/config/plugin.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const plugins = [

if (!process.env.PSP_NO_MINIFY && !process.env.PSP_DEBUG) {
plugins.push(new UglifyJSPlugin({
sourceMap: false,
sourceMap: true,
mangle: false,
output: {
ascii_only: true
Expand All @@ -29,6 +29,7 @@ if (!process.env.PSP_NO_MINIFY && !process.env.PSP_DEBUG) {
module.exports = Object.assign({}, common(), {
entry: './src/ts/index.ts',
plugins: plugins,
externals: ['@jupyter-widgets/base'],
output: {
filename: 'index.js',
libraryTarget: "umd",
Expand Down
Loading