/** * @class LocalTemplate */ export class LocalTemplate { /** * Loads local template from a localPath * * @param {string} localPath Folder or .scafflater file path of partial * @returns {Promise} A list of loaded templates from local path */ static loadFromPath(localPath: string): Promise; /** * Creates a template stored locally * * @param {string} folderPath - Template path * @param {string} configPath - Template config file path * @param {string} name - Template name * @param {string} description - Template description * @param {string} version - Template version * @param {LocalPartial[]} partials - The partials of the template * @param {(ScafflaterOptions|object)} options - Template options * @param {object[]} parameters - Template parameters */ constructor(folderPath: string, configPath: string, name: string, description: string, version: string, partials?: LocalPartial[], options?: (ScafflaterOptions | object), parameters?: object[]); /** * Template name * * @description The template name must follow the pattern [a-z-]{3,} * @type {string} */ name: string; /** * Template description * * @type {string} */ description: string; /** * Template version * * @description Should follow the semver patterns (https://semver.org/) * @type {string} */ version: string; /** * Partials of the template * * @type {LocalPartial[]} */ partials: LocalPartial[]; /** * Parameters to generate template. * * @description Scafflater uses Inquirer to get the parameters through scafflater-cli. The objects in this list must be assigned to inquirer question object(https://github.com/SBoudrias/Inquirer.js#questions). * @type {object[]} */ parameters: object[]; /** * Template path * * @description The template path * @type {string} */ folderPath: string; /** * Template config file path * * @type {string} */ configPath: string; /** * Scafflater Options to generate template * * @type {ScafflaterOptions} */ options: ScafflaterOptions; } /** * @class LocalPartial */ export class LocalPartial { /** * Loads local partial from a localPath * * @param {string} localPath Folder or .scafflater file path of partial * @returns {Promise} The partial in the localPath, if it exists. */ static loadFromPath(localPath: string): Promise; /** * Creates a Partial stored locally * * @param {string} folderPath - Partial path * @param {string} name - Partial name * @param {string} description - Partial description * @param {(ScafflaterOptions|object)} options - Partial options * @param {object[]} parameters - Partial parameters */ constructor(folderPath: string, name: string, description: string, options?: (ScafflaterOptions | object), parameters?: object[]); /** * Partial name * * @description The Partial name must follow the pattern [a-z-]{3,} * @type {string} */ name: string; /** * Partial description * * @type {string} */ description: string; /** * Scafflater Options to generate partial * * @type {ScafflaterOptions} */ options: ScafflaterOptions; parameters: any[]; /** * Partial path * * @description The partial path * @type {string} */ folderPath: string; } import { ScafflaterOptions } from "../options";