feat: create sync plugin structure

This commit is contained in:
2026-06-20 02:28:15 +08:00
parent 12d491a786
commit 6fb16442cb
3 changed files with 55 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
{
"name": "verstak-sync-plugin",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "vite build",
"dev": "vite build --watch"
},
"devDependencies": {
"vite": "^5.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.0.0"
}
}
+25
View File
@@ -0,0 +1,25 @@
import SyncSettings from './SyncSettings.svelte';
import SyncStatusBar from './SyncStatusBar.svelte';
window.VerstakPluginRegister('verstak.sync', {
components: {
SyncSettings: {
mount(container, props, api) {
return new SyncSettings({
target: container,
props: { ...props, api }
});
},
unmount(container) {}
},
SyncStatusBar: {
mount(container, props, api) {
return new SyncStatusBar({
target: container,
props: { ...props, api }
});
},
unmount(container) {}
}
}
});