UNPKG

zotero-plugin-scaffold

Version:
84 lines (76 loc) 2.31 kB
import { U as UserConfig, O as OverrideConfig, C as Context, B as Base } from './shared/zotero-plugin-scaffold.fkuivpCE.mjs'; import 'hookable'; import 'esbuild'; /** * Helper for user define configuration. */ declare function defineConfig(userConfig: UserConfig): UserConfig; /** * Loads config * @param [overrides] Highest Priority Configuration. * @returns Config with userDefined and defaultConfig merged. */ declare function loadConfig(overrides?: OverrideConfig): Promise<Context>; declare class Build extends Base { private buildTime; constructor(ctx: Context); /** * Default build runner */ run(): Promise<void>; private prepareAssets; bundle(): Promise<void>; buildInProduction(): Promise<void>; exit(): void; } declare class Release extends Base { constructor(ctx: Context); /** * Runs release * * if is not CI,bump version, git add (package.json), git commit, git tag, git push; * if is CI, do not bump version, do not run git, create release (tag is `v${version}`) and upload xpi, * then, create or update release (tag is "release"), update `update.json`. */ run(): Promise<void>; getChangelog(): Promise<string>; private isEnabled; exit(): void; get resolvedCommitMessage(): string; } declare class Serve extends Base { private builder; private runner?; private _zoteroBinPath?; constructor(ctx: Context); run(): Promise<void>; /** * watch source dir and build when file changed */ watch(): Promise<void>; reload(): Promise<void>; exit: () => never; private onZoteroExit; get zoteroBinPath(): string; get profilePath(): string | undefined; get dataDir(): string | undefined; } declare class Test extends Base { private builder; private zotero?; private reporter; private testBundler?; constructor(ctx: Context); run(): Promise<void>; watch(): Promise<void>; startZotero(): Promise<void>; private onZoteroExit; exit: (code?: string | number) => never; private get zoteroBinPath(); private get prefs(); } declare const Config: { defineConfig: typeof defineConfig; loadConfig: typeof loadConfig; }; export { Build, Config, Release, Serve, Test, defineConfig };