Skip to content

Commit 27c30c7

Browse files
committed
simplify
1 parent a788566 commit 27c30c7

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

src/index.ts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,37 @@
1-
export * from './plugin';
1+
import {
2+
JupyterFrontEnd,
3+
JupyterFrontEndPlugin
4+
} from '@jupyterlab/application';
5+
6+
import {
7+
showCellDiffCommand
8+
} from './command';
9+
10+
import {
11+
ICellFooterTracker
12+
} from 'jupyterlab-cell-input-footer';
13+
14+
/**
15+
* A JupyterLab plugin providing a command for displaying a diff below a cell.
16+
*/
17+
const showDiff: JupyterFrontEndPlugin<void> = {
18+
id: 'jupyterlab-cell-diff',
19+
requires: [ICellFooterTracker],
20+
autoStart: true,
21+
activate: async (
22+
app: JupyterFrontEnd,
23+
cellFooterTracker: ICellFooterTracker,
24+
) => {
25+
console.log("Jupyterlab extension - show cell diff.")
26+
await app.serviceManager.ready;
27+
28+
app.commands.addCommand(
29+
'show-diff',
30+
{
31+
execute: showCellDiffCommand(cellFooterTracker)
32+
}
33+
)
34+
}
35+
};
36+
37+
export default [showDiff];

src/plugin.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)