UNPKG

honkit

Version:

HonKit is building beautiful books using Markdown.

69 lines 1.76 kB
import Immutable from "immutable"; import PluginDependency from "./pluginDependency"; type Content = Immutable.Map<any, any>; type Package = Immutable.Map<any, any>; declare const Plugin_base: Immutable.Record.Class; declare class Plugin extends Plugin_base { getName(): string; getPath(): string; getVersion(): string; getPackage(): Package; getContent(): Content; getDepth(): number; getParent(): string; /** * Return the ID on NPM for this plugin * return package.json's name * @return {string} */ getNpmID(): string; /** * Check if a plugin is loaded * @return {boolean} */ isLoaded(): boolean; /** * Check if a plugin is a theme given its name * @return {boolean} */ isTheme(): boolean; /** * Return map of hooks */ getHooks(): Immutable.Map<string, Function>; /** * Return infos about resources for a specific type * @param {string} type * @return {Map<String:Mixed>} */ getResources(type: string): any; /** * Return map of filters * @return {Map<String:Function>} */ getFilters(): any; /** * Return map of blocks * @return {Map<String:TemplateBlock>} */ getBlocks(): any; /** * Return a specific hook * @param {string} name * @return {Function|undefined} */ getHook(name: string): Function; /** * Create a plugin from a string * @return {Plugin} * @param s */ static createFromString(s: string): Plugin; /** * Create a plugin from a dependency * @return {Plugin} */ static createFromDep(dep: PluginDependency): Plugin; } export default Plugin; //# sourceMappingURL=plugin.d.ts.map