* feature: event based plugin * chore: update README.md * Update yarn script for build plugins (#363) * Update yarn script for build plugins * Plugin-core install from npmjs instead of from local --------- Co-authored-by: Hien To <> * #360 plugin preferences (#361) * feature: #360 plugin preferences * chore: update core-plugin README.md * chore: create collections on start * chore: bumb core version * chore: update README * chore: notify preferences update * fix: preference update --------- Co-authored-by: hiento09 <136591877+hiento09@users.noreply.github.com>
22 lines
492 B
TypeScript
22 lines
492 B
TypeScript
import { store } from "./storeService";
|
|
import { EventEmitter } from "./eventsService";
|
|
|
|
export const setupCoreServices = () => {
|
|
if (typeof window === "undefined") {
|
|
console.log("undefine", window);
|
|
return;
|
|
} else {
|
|
console.log("Setting up core services");
|
|
}
|
|
if (!window.corePlugin) {
|
|
window.corePlugin = {
|
|
store,
|
|
events: new EventEmitter(),
|
|
};
|
|
}
|
|
if (!window.coreAPI) {
|
|
// fallback electron API
|
|
window.coreAPI = window.electronAPI;
|
|
}
|
|
};
|