export = TemplateSource; /** * TemplateSource factory. */ declare class TemplateSource { /** * Resolves the template source from source key. * * @param {ScafflaterOptions} options The Scafflater Options * @param {string} sourceKey - The key of source path. Ir can be a local folder path, a git url, or other path that is recognized by template source through isValidSourceKey function * @returns {TemplateSource} An specialized instance of TemplateSource. */ static resolveTemplateSourceFromSourceKey(options: ScafflaterOptions, sourceKey: string): TemplateSource; /** * Returns the template source instance to be used to get templates. * * @param {?object} config - Scafflater configuration. If null, will get the default configuration. * @returns {TemplateSource} An specialized instance of TemplateSource. */ static getTemplateSource(config: object | null): TemplateSource; /** * Template Source constructor. * * @param {?ScafflaterOptions} options - Scafflater Options. If null, will get the default options. */ constructor(options?: ScafflaterOptions | null); options: ScafflaterOptions; /** * The source name. * * @type {string} */ source: string; /** * Gets the template and copies it in a local folder. * * @param {string} sourceKey - The source key of template. Will vary, depending on template source * @param {?string} outputDir - Folder where template must be copied. If null, a temp folder will be used. * @returns {Promise} The local template */ getTemplate(sourceKey: string, outputDir?: string | null): Promise; /** * Gets an Source object for this source * * @param {string} key The source key * @returns {Source} An Source object */ getSource(key: string): typeof Source; } import { ScafflaterOptions } from "../options"; import { LocalTemplate } from "../scafflater-config/local-template"; import Source = require("../scafflater-config/source");