Afshin Darian 8 лет назад
Родитель
Сommit
0983b77a5b
3 измененных файлов с 8 добавлено и 7 удалено
  1. 4 3
      src/faq/index.ts
  2. 2 2
      src/faq/plugin.ts
  3. 2 2
      src/help/plugin.ts

+ 4 - 3
src/faq/index.ts

@@ -5,9 +5,10 @@ export * from './widget';
 
 
 /**
- * The map of command ids used by the faq plugin.
+ * The command IDs used by the FAQ plugin.
  */
 export
-const cmdIds = {
-  open: 'faq-jupyterlab:open',
+namespace CommandIDs {
+  export
+  const open = 'faq-jupyterlab:open';
 };

+ 2 - 2
src/faq/plugin.ts

@@ -22,7 +22,7 @@ import {
 } from '../instancerestorer';
 
 import {
-  FaqModel, FaqWidget, cmdIds
+  FaqModel, FaqWidget, CommandIDs
 } from './';
 
 
@@ -48,7 +48,7 @@ export default plugin;
  */
 function activate(app: JupyterLab, palette: ICommandPalette, linker: ICommandLinker, restorer: IInstanceRestorer): void {
   const category = 'Help';
-  const command = cmdIds.open;
+  const command = CommandIDs.open;
   const model = new FaqModel();
   const tracker = new InstanceTracker<FaqWidget>({ namespace: 'faq' });
 

+ 2 - 2
src/help/plugin.ts

@@ -38,7 +38,7 @@ import {
 } from '../commandpalette';
 
 import {
-  cmdIds as faqCmdIds
+  CommandIDs as FAQCommandIDs
 } from '../faq';
 
 import {
@@ -198,7 +198,7 @@ function activate(app: JupyterLab, mainMenu: IMainMenu, palette: ICommandPalette
     menu.title.label = category;
 
     menu.addItem({ command: AboutCommandIDs.open });
-    menu.addItem({ command: faqCmdIds.open });
+    menu.addItem({ command: FAQCommandIDs.open });
     menu.addItem({ command: cmdIds.launchClassic });
     menu.addItem({ type: 'separator' });
     RESOURCES.forEach(args => { menu.addItem({ args, command }); });