Rename plugin
This commit is contained in:
parent
dd86a507d1
commit
b17e69edda
3 changed files with 11 additions and 13 deletions
|
|
@ -123,7 +123,7 @@ const cssContext = await esbuild.context({
|
||||||
});
|
});
|
||||||
|
|
||||||
const jsContext = await esbuild.context({
|
const jsContext = await esbuild.context({
|
||||||
entryPoints: ["src/plugin.ts"],
|
entryPoints: ["src/vault-link-plugin.ts"],
|
||||||
bundle: true,
|
bundle: true,
|
||||||
external: [
|
external: [
|
||||||
"obsidian",
|
"obsidian",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "obsidian-sample-plugin",
|
"name": "vault-link-obsidian-plugin",
|
||||||
"version": "0.0.12",
|
"version": "0.0.12",
|
||||||
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
|
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
|
|
@ -35,4 +35,4 @@
|
||||||
"typescript": "5.7.2",
|
"typescript": "5.7.2",
|
||||||
"typescript-eslint": "8.18.0"
|
"typescript-eslint": "8.18.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3,22 +3,22 @@ import { Plugin } from "obsidian";
|
||||||
|
|
||||||
import * as lib from "../../backend/sync_lib/pkg/sync_lib.js";
|
import * as lib from "../../backend/sync_lib/pkg/sync_lib.js";
|
||||||
import * as wasmBin from "../../backend/sync_lib/pkg/sync_lib_bg.wasm";
|
import * as wasmBin from "../../backend/sync_lib/pkg/sync_lib_bg.wasm";
|
||||||
import { SyncSettingsTab } from "./views/settings-tab";
|
import { SyncSettingsTab } from "./views/settings-tab.js";
|
||||||
import { HistoryView } from "./views/history-view.js";
|
import { HistoryView } from "./views/history-view.js";
|
||||||
|
|
||||||
import { ObsidianFileEventHandler } from "./events/obisidan-event-handler.js";
|
import { ObsidianFileEventHandler } from "./events/obisidan-event-handler.js";
|
||||||
import { SyncService } from "./services/sync-service";
|
import { SyncService } from "./services/sync-service.js";
|
||||||
import { Database } from "./database/database";
|
import { Database } from "./database/database.js";
|
||||||
import { applyRemoteChangesLocally } from "./sync-operations/apply-remote-changes-locally";
|
import { applyRemoteChangesLocally } from "./sync-operations/apply-remote-changes-locally.js";
|
||||||
import { ObsidianFileOperations } from "./file-operations/obsidian-file-operations";
|
import { ObsidianFileOperations } from "./file-operations/obsidian-file-operations.js";
|
||||||
import { StatusBar } from "./views/status-bar";
|
import { StatusBar } from "./views/status-bar.js";
|
||||||
import { Logger } from "./tracing/logger.js";
|
import { Logger } from "./tracing/logger.js";
|
||||||
import { SyncHistory } from "./tracing/sync-history.js";
|
import { SyncHistory } from "./tracing/sync-history.js";
|
||||||
import { LogsView } from "./views/logs-view.js";
|
import { LogsView } from "./views/logs-view.js";
|
||||||
import { Syncer } from "./sync-operations/syncer.js";
|
import { Syncer } from "./sync-operations/syncer.js";
|
||||||
import { StatusDescription } from "./views/status-description.js";
|
import { StatusDescription } from "./views/status-description.js";
|
||||||
|
|
||||||
export default class SyncPlugin extends Plugin {
|
export default class VaultLinkPlugin extends Plugin {
|
||||||
private readonly operations = new ObsidianFileOperations(this.app.vault);
|
private readonly operations = new ObsidianFileOperations(this.app.vault);
|
||||||
private readonly history = new SyncHistory();
|
private readonly history = new SyncHistory();
|
||||||
private settingsTab: SyncSettingsTab;
|
private settingsTab: SyncSettingsTab;
|
||||||
|
|
@ -125,7 +125,7 @@ export default class SyncPlugin extends Plugin {
|
||||||
HistoryView.TYPE,
|
HistoryView.TYPE,
|
||||||
(leaf) => new HistoryView(leaf, database, this.history)
|
(leaf) => new HistoryView(leaf, database, this.history)
|
||||||
);
|
);
|
||||||
this.registerView(LogsView.TYPE, (leaf) => new LogsView(leaf));
|
this.registerView(LogsView.TYPE, (leaf) => new LogsView(this, leaf));
|
||||||
|
|
||||||
this.addRibbonIcon(
|
this.addRibbonIcon(
|
||||||
HistoryView.ICON,
|
HistoryView.ICON,
|
||||||
|
|
@ -139,8 +139,6 @@ export default class SyncPlugin extends Plugin {
|
||||||
);
|
);
|
||||||
|
|
||||||
Logger.getInstance().info("Plugin loaded");
|
Logger.getInstance().info("Plugin loaded");
|
||||||
|
|
||||||
this.openSettings();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public onunload(): void {
|
public onunload(): void {
|
||||||
Loading…
Add table
Add a link
Reference in a new issue