-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a795a97
commit bdd04ff
Showing
7 changed files
with
90 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
// In an AMD module, we set the public path using the magic requirejs 'module' dependency | ||
// See https://github.com/requirejs/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#module | ||
// Since 'module' is a requirejs magic module, we must include 'module' in the webpack externals configuration. | ||
import * as module from 'module'; | ||
const url = new URL(module.uri, document.location) | ||
// Using lastIndexOf('/')+1 gives us the empty string if there is no '/', so pathname becomes '/' | ||
url.pathname = url.pathname.slice(0,url.pathname.lastIndexOf('/')+1); | ||
__webpack_public_path__ = `${url.origin}${url.pathname}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
var aladin = require('./index'); | ||
import {ModelAladin, ViewAladin} from './index.js'; | ||
import {IJupyterWidgetRegistry} from '@jupyter-widgets/base'; | ||
|
||
var base = require('@jupyter-widgets/base'); | ||
|
||
/** | ||
* The widget manager provider. | ||
*/ | ||
module.exports = { | ||
id: 'ipyaladin', | ||
requires: [base.IJupyterWidgetRegistry], | ||
export const IPyAladinWidgetPlugin = { | ||
id: 'ipyaladin:plugin', | ||
requires: [IJupyterWidgetRegistry], | ||
activate: function(app, widgets) { | ||
widgets.registerWidget({ | ||
name: 'ipyaladin', | ||
version: aladin.version, | ||
exports: aladin | ||
version: '0.1.10', | ||
exports: { ModelAladin, ViewAladin } | ||
}); | ||
}, | ||
}, | ||
autoStart: true | ||
} | ||
}; | ||
|
||
export default IPyAladinWidgetPlugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters