/// <reference types="node" />
import { ILogger } from 'pargv';
import { EventEmitter } from 'events';
import { IMustr, IMustrOptions, ITemplates, ITemplate, IMetadata, NodeCallback, IRegister, IRegisterOptions, IInject } from './interfaces';
export declare class Mustr extends EventEmitter implements IMustr {
    cwd: string;
    log: ILogger;
    registerPath: string;
    templatesPath: string;
    outputPath: string;
    templatesGlob: string[];
    templates: ITemplates;
    options: IMustrOptions;
    constructor(options?: IMustrOptions);
    /**
     * Has Matter
     * Tests if string contains front matter.
     *
     * @param str the string to inspect.
     */
    private hasMatter(str);
    /**
     * Has Template
     * Loosly check if string contains template chars.
     *
     * @param str the string to inspect.
     */
    private hasTemplate(str);
    /**
     * Try Require
     * Tries to require a module logging error if failed.
     *
     * @param path the module path to be required.
     */
    private tryRequire(path);
    /**
     * Normalize Extension
     * Ensures extension begins with "."
     *
     * @param ext the extension to be normalized.
     */
    private normalizedExt(ext);
    /**
     * Normalize
     * Parses/normalizes a template name, path or static template string.
     * When passing a name it searches loaded template paths and matches
     * the filename to the template name passed.
     *
     * @param template the template name, path or static template string.
     */
    private normalize(template);
    /**
     * Truncate
     * Nothing special, cheesy truncation...move along.
     *
     * @param str the string to be truncated.
     * @param max the max len before truncating.
     */
    private truncate(str, max);
    /**
     * Init
     * Initializes Mustr for current project
     *
     * @param force when true forces init.
     */
    init(force?: boolean): void;
    /**
     * Load
     * Loads the template paths and config.
     */
    load(): IMustr;
    /**
     * Configure
     * Configures template for output.
     *
     * @param name the name of the template to load.
     * @param output the output name/path to use when rendering.
     * @param options any metadata to merge for rendering.
     */
    configure(name: string, output?: string | IMetadata, metadata?: IMetadata): ITemplate;
    /**
     * Register
     * Registers a template with Mustr.
     *
     * @param name to use when registering a template.
     * @param template the template name or path to lookup or a static string.
     */
    register(name: string | IRegisterOptions, template?: string): IRegister;
    /**
     * Render
     * Renders the requested template.
     *
     * @param name the name of the template to render.
     * @param output the output path/name to render the template as.
     * @param options the metadata options to extend with if any.
     */
    render(name: string | ITemplate, output?: string | IMetadata | NodeCallback, metadata?: IMetadata | NodeCallback, done?: NodeCallback): void;
    /**
     * Inject
     * Creates a file stream reading chunks until match.
     * Upon match the provided value is injected.
     * NOTE: lines are auto updated with the correct
     * line ending for returns.
     *
     * @param filename the file name to inject into.
     * @param find the string or expression to match.
     * @param insert the value or callback for injecting upon match.
     * @param strategy insert on before, after, replace, first or last when matched.
     * @param done the callback on file written.
     */
    inject(filename: string | IInject, find?: string | RegExp | NodeCallback, strategy?: 'before' | 'after' | 'first' | 'last' | 'replace', insert?: string | string[], done?: NodeCallback): void;
    /**
     * Transform To
     * Transforms a string to the desired casing.
     *
     * @param str the string to be transformed.
     * @param to the casing to be transformed to using lodash.
     */
    transformCase(str: string, to: string): string;
}
