Skip to content

Commit

Permalink
Cleanup labextension
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed Mar 12, 2020
1 parent 7cf923e commit 8df92a0
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ipycytoscape/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Copyright (c) Mariana Meireles.
# Distributed under the terms of the Modified BSD License.

from .ipycytoscape import CytoscapeWidget
from .cytoscape import CytoscapeWidget
from ._version import __version__, version_info

from .nbextension import _jupyter_nbextension_paths
File renamed without changes.
4 changes: 2 additions & 2 deletions ipycytoscape/nbextension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension/static',
'dest': 'ipycytoscape',
'require': 'ipycytoscape/extension'
'dest': 'jupyter-cytoscape',
'require': 'jupyter-cytoscape/extension'
}]
2 changes: 1 addition & 1 deletion ipycytoscape/nbextension/static/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define(function() {
window['requirejs'].config({
map: {
'*': {
'ipycytoscape': 'nbextensions/ipycytoscape/index',
'jupyter-cytoscape': 'nbextensions/jupyter-cytoscape/index',
},
}
});
Expand Down
2 changes: 1 addition & 1 deletion jupyter-cytoscape.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"load_extensions": {
"ipycytoscape/extension": true
"jupyter-cytoscape/extension": true
}
}
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}

data_files_spec = [
('share/jupyter/nbextensions/ipycytoscape',
('share/jupyter/nbextensions/jupyter-cytoscape',
nb_path, '*.js*'),
('share/jupyter/lab/extensions', lab_path, '*.tgz'),
('etc/jupyter/nbconfig/notebook.d' , HERE, 'jupyter-cytoscape.json')
Expand Down Expand Up @@ -87,7 +87,6 @@
include_package_data = True,
install_requires = [
'ipywidgets>=7.0.0',
'networkx',
],
extras_require = {
'test': [
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
// Some static assets may be required by the custom widget javascript. The base
// url for the notebook is not known at build time and is therefore computed
// dynamically.
(window as any).__webpack_public_path__ = document.querySelector('body')!.getAttribute('data-base-url') + 'nbextensions/ipycytoscape';
(window as any).__webpack_public_path__ = document.querySelector('body')!.getAttribute('data-base-url') + 'nbextensions/jupyter-cytoscape';

export * from './index';
2 changes: 1 addition & 1 deletion src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
MODULE_NAME, MODULE_VERSION
} from './version';

const EXTENSION_ID = 'ipycytoscape:plugin';
const EXTENSION_ID = 'jupyter-cytoscape:plugin';

/**
* The example plugin.
Expand Down
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = [
},

/**
* Embeddable ipycytoscape bundle
* Embeddable jupyter-cytoscape bundle
*
* This bundle is almost identical to the notebook extension bundle. The only
* difference is in the configuration of the webpack public path for the
Expand All @@ -54,8 +54,8 @@ module.exports = [
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'amd',
library: "ipycytoscape",
publicPath: 'https://unpkg.com/ipycytoscape@' + version + '/dist/'
library: "jupyter-cytoscape",
publicPath: 'https://unpkg.com/jupyter-cytoscape@' + version + '/dist/'
},
devtool: 'source-map',
module: {
Expand All @@ -76,7 +76,7 @@ module.exports = [
output: {
filename: 'embed-bundle.js',
path: path.resolve(__dirname, 'docs', 'source', '_static'),
library: "ipycytoscape",
library: "jupyter-cytoscape",
libraryTarget: 'amd'
},
module: {
Expand Down

0 comments on commit 8df92a0

Please sign in to comment.