configureCommunityPlugin
Writes settings into a community plugin’s data.json, shallow-merging them over any existing settings (creating the file if absent). Writing settings BEFORE the plugin is enabled makes it load already configured, with no reload. A no-op write is skipped: when the merge changes nothing, the file is left untouched and false is returned, so a caller can avoid reloading an already-correctly-configured plugin.
Import:
import { configureCommunityPlugin } from 'obsidian-dev-utils/obsidian/community-plugins';Signature:
function configureCommunityPlugin(params: ConfigureCommunityPluginParams): Promise<boolean>Parameters:
| Parameter | Type | Description |
|---|---|---|
params | ConfigureCommunityPluginParams | The ConfigureCommunityPluginParams. |
Returns: Promise<boolean> — A Promise that resolves to true if the data.json content changed (and was written), or false if the settings were already present (nothing written).
Links to this page: