UNPKG

@telefonica/opensource-scaffold

Version:

Scaffolding for open source projects. A CLI tool to create open source repositories with standard tools and resources

43 lines (42 loc) 1.32 kB
import type { CreatorOptions } from "./Creator.types.js"; import type { Resource } from "./Resources.types.js"; /** * Class creating the scaffold resources */ export declare class Creator { private _checker; private _logger; private _logLevel; private _license; private _resourcesToOverwrite; private _templatesContext; private _overwrite?; /** * Constructor * @param options Options for the creator */ constructor({ log, license, copyrightHolder, projectName, projectDescription, overwrite, repositoryUrl, communityEmail, }: CreatorOptions); /** Validates an email */ static validateEmail(email: string): boolean; /** Validates a repository url */ static validateRepositoryUrl(value: string): boolean; /** * Returns a list of existing resources */ getConflicts(silent?: boolean): Resource[]; /** * Set the resources to overwrite * @param resources The resources to overwrite */ setResourcesToOverwrite(resources: Resource[]): void; /** * Create the scaffold resources */ create(): Promise<void>; /** * Creates a resource * @param resource The resource to create * @param editor The MemFsEditor instance where the resource will be created */ private _createResource; }