export type ConfigLoadResult = { /** * The folder path from where the config was loaded. */ folderPath: string; /** * The file path from where the config was loaded. */ filePath: string; /** * The loaded file content. */ config: Config; }; /** * @class Output * @description Output configuration, with info about generated templates and partials. */ export class Config { /** * Load an single file from a path * * @param {string} localPath Folder or scafflater.jsonc file path of partial * @param {boolean} createIfNotExists If true, will create the file if if * @returns {Promise} The loaded config result. Null if not found. */ static fromLocalPath(localPath: string, createIfNotExists?: boolean): Promise; /** * Scans a directory tree indicated by localPath and returns all .scafflater configurations. * * @param {string} localPath Local path to scan * @returns {Promise} The loaded config result */ static scanLocalPath(localPath: string): Promise; /** * * @param {?TemplateConfig} template The template config * @param {?PartialConfig} partial The partial config * @param {?RanTemplate[]} templates The ran templates * @param {ScafflaterOptions|object} options The folder scafflater options */ constructor(template?: TemplateConfig | null, partial?: PartialConfig | null, templates?: RanTemplate[] | null, options?: ScafflaterOptions | object); /** * Template Config. * If the folder contains a Template, this property describes it. * * @type {TemplateConfig} */ template: TemplateConfig; /** * Template Config. * If the folder contains a Template, this property describes it. * * @type {PartialConfig} */ partial: PartialConfig; /** * The templates used to generated code in ths folder * * @type {RanTemplate[]} */ templates: RanTemplate[]; /** * Options for the folder where the scafflater file is present * * @type {ScafflaterOptions} */ options: ScafflaterOptions; /** * Saves the the config to a scafflater.jsonc file * * @param {string} filePath The file path where file must be saved */ save(filePath: string): Promise; /** * Checks if the template is initialized * * @param {string} templateName Template name to check * @returns {boolean} True if is initialized */ isInitialized(templateName: string): boolean; } import { TemplateConfig } from "./template-config"; import { PartialConfig } from "./partial-config"; import RanTemplate = require("./ran-template"); import { ScafflaterOptions } from "../options";