obsidian-dev-utils
Version:
This is the collection of useful functions that you can use for your Obsidian plugin development
20 lines (19 loc) • 1.03 kB
text/typescript
/**
* @packageDocumentation
*
* This module defines an esbuild plugin that automatically copies the build output
* to the Obsidian plugins folder during development. This plugin helps streamline
* the development workflow by ensuring that the latest build is always available
* in the correct Obsidian folder for testing and use.
*/
import type { Plugin } from 'esbuild';
/**
* Creates an esbuild plugin that copies the build output to the Obsidian plugins folder.
*
* @param isProductionBuild - A boolean indicating whether the build is a production build.
* @param distFolder - The folder where the built files are located.
* @param obsidianConfigFolder - The folder of the Obsidian configuration. If not provided, the plugin will not copy files.
* @param pluginName - The name of the Obsidian plugin.
* @returns An esbuild `Plugin` object.
*/
export declare function copyToObsidianPluginsFolderPlugin(isProductionBuild: boolean, distFolder: string, obsidianConfigFolder: string, pluginName: string): Plugin;