UNPKG

@mdfriday/foundry

Version:

The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.

46 lines (45 loc) 1.6 kB
import { Module as IModule, Mount as IMount, Import, ModuleMetadata, Info } from '../type'; import { Fs } from '../../fs/type'; import { Mount } from './mount'; export declare class Module implements IModule { private fs; private absoluteDir; private modulePath; private parentModule; private mountDirs; private metadata; private isProject; constructor(fs: Fs, absoluteDir: string, modulePath: string, parent?: Module | null, isProject?: boolean); isProjectModule(): boolean; owner(): Module | null; mounts(): IMount[]; dir(): string; path(): string; setMetadata(metadata: ModuleMetadata): void; getMetadata(): ModuleMetadata | null; applyMounts(moduleImport: Import): Promise<void>; appendMount(mount: Mount): void; removeMount(mount: Mount): boolean; getMountByTarget(targetPath: string): Mount | null; getMountsByComponent(component: string): Mount[]; isDownloaded(): boolean; isDownloading(): boolean; isDownloadFailed(): boolean; exists(): Promise<boolean>; copy(): Module; toString(): string; } export declare class ProjectModule { private module; constructor(module: Module); getModule(): Module; appendMount(mount: Mount): void; setDefaultLanguage(lang: string): void; applyDefaultMounts(): void; owner(): Module | null; mounts(): IMount[]; dir(): string; path(): string; } export declare function newModule(fs: Fs, absoluteDir: string, modulePath: string, parent?: Module): Module; export declare function newProjectModule(info: Info): ProjectModule;