You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-11 23:17:19 +02:00
15 lines
667 B
TypeScript
15 lines
667 B
TypeScript
import CommandService from '@joplin/lib/services/CommandService';
|
|
import stateToWhenClauseContext from '@joplin/lib/services/commands/stateToWhenClauseContext';
|
|
import libCommands from '@joplin/lib/commands/index';
|
|
import { State } from '@joplin/lib/reducer';
|
|
import { Store } from 'redux';
|
|
|
|
export default function initializeCommandService(store: Store<State>, devMode: boolean) {
|
|
CommandService.instance().initialize(store, devMode, stateToWhenClauseContext);
|
|
|
|
for (const command of libCommands) {
|
|
CommandService.instance().registerDeclaration(command.declaration);
|
|
CommandService.instance().registerRuntime(command.declaration.name, command.runtime());
|
|
}
|
|
}
|