Skip to content

Commit

Permalink
Merge pull request #116 from mamba-org/fcollonval/issue115
Browse files Browse the repository at this point in the history
Classic notebook extension with 2.0.0
  • Loading branch information
jtpio authored Dec 4, 2020
2 parents 0ad6ce7 + 0674a70 commit ad9f95f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion jupyter-config/nbconfig/notebook.d/mamba_gator.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"load_extensions": {
"mamba_gator/static/main": true
"mamba_gator/main": true
}
}
2 changes: 1 addition & 1 deletion jupyter-config/nbconfig/tree.d/mamba_gator.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"load_extensions": {
"mamba_gator/static/tree": true
"mamba_gator/tree": true
}
}
3 changes: 2 additions & 1 deletion packages/navigator/src/gator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './gator-public-path';
import main from './index';

export * from './index';
window.addEventListener('load', main);
4 changes: 1 addition & 3 deletions packages/navigator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../style/index.css';
/**
* The main function
*/
async function main(): Promise<void> {
export default async function main(): Promise<void> {
const app = new Gator();
const mods = [
require('./plugins/paths'),
Expand All @@ -19,5 +19,3 @@ async function main(): Promise<void> {

await app.start();
}

window.addEventListener('load', main);
3 changes: 2 additions & 1 deletion packages/navigator/src/notebook.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './nb-public-path';
import main from './index';

export * from './index';
window.addEventListener('load', main);
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@
[
os.path.join(classic_folder, a_file)
for a_file in os.listdir(classic_folder)
if os.path.isfile(os.path.join(classic_folder, a_file)) and not a_file.endswith(".py")
if os.path.isfile(os.path.join(classic_folder, a_file))
and not a_file.endswith(".py")
]
),
(
"share/jupyter/nbextensions/mamba_gator/static",
[
os.path.join(classic_folder, "static", a_file)
for a_file in os.listdir(os.path.join(classic_folder, "static"))
if os.path.isfile(os.path.join(classic_folder, "static", a_file))
and not a_file.endswith(".py")
],
),
# like `jupyter nbextension enable --sys-prefix`
Expand All @@ -46,6 +56,7 @@
"etc/jupyter/nbconfig/tree.d",
["jupyter-config/nbconfig/tree.d/mamba_gator.json"],
),
# place JupyterLab extension where it can be found
(
"share/jupyter/lab/extensions",
[
Expand Down

0 comments on commit ad9f95f

Please sign in to comment.