Skip to content

Commit

Permalink
Merge pull request #33 from blink1073/fix-modules
Browse files Browse the repository at this point in the history
Fix handling of module imports
  • Loading branch information
blink1073 authored Nov 20, 2017
2 parents 95f49c9 + 4699b15 commit cbff39a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions js/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
var MPLCanvasModel = require('./mpl_widget').MPLCanvasModel;
var MPLCanvasView = require('./mpl_widget').MPLCanvasView;

module.exports = {
MPLCanvasModel: MPLCanvasModel,
MPLCanvasView: MPLCanvasView
}
// Export widget models and views, and the npm package version number.
module.exports = require('./mpl_widget.js');
module.exports['version'] = require('../package.json').version;

4 changes: 2 additions & 2 deletions js/src/nb_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
__webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/jupyter-matplotlib/';

// Export widget models and views, and the npm package version number.
module.exports = require('./mpl_widget.js');
module.exports['version'] = require('../package.json').version;
module.exports = require('./index.js');

0 comments on commit cbff39a

Please sign in to comment.