Skip to content

archivePluginDemoVault

Archives the plugin’s demo vault (demo-vault/ in the repo root) as a release artifact.

Installs the freshly built plugin from dist/build/ into the vault’s .obsidian/plugins/<id>/ folder, then zips the whole vault to dist/build/<plugin-id>-demo-vault-<version>.zip.

Import:

import { archivePluginDemoVault } from 'obsidian-dev-utils/script-utils/demo-vault';

Signature:

function archivePluginDemoVault(): Promise<string | null>

Returns: Promise<string | null> — A Promise that resolves to the absolute path of the created zip archive, or null if the repo has no demo-vault/ folder.