import { IProjectSettings } from './interfaces'; export declare type TGeneratorProcessorMethod = (generator: Generator) => Promise; /** * @class Utility class for project generation. */ export declare class Generator { private _settings; private _packages; private _templatesDirectory; private _preProcessors; private _postProcessors; /** * Gets the path to the directory of the project to generate. */ get outputPath(): string; /** * Gets the path to the templates directory. */ get templatesDirectory(): string; /** * Gets user defined settings for project generation. */ get settings(): IProjectSettings; /** * Gets the name of the package, without the scope part. */ get packageName(): string; /** * Gets the name of the package, without the scope part, with first letter uppercase and without any space or underscore. */ get nicifiedPackageName(): string; /** * Class constructor. * @param settings The user defined settings for the project to generate. * @param templatesDirectory The path to the templates directory. */ constructor(settings: IProjectSettings, templatesDirectory: string); /** * Registers a method to call on project preprocessing (before installing dependencies). * @param name The name of the operation (for debug and feedback purposes). * @param callback The method to call when pre-processing the project generation. */ registerPreProcessor(name: string, callback: TGeneratorProcessorMethod): void; /** * Registers a method to call on project postprocessing (after installing dependencies). * @param name The name of the operation (for debug and feedback purposes). * @param callback The method to call when post-processing the project generation. */ registerPostProcessor(name: string, callback: TGeneratorProcessorMethod): void; /** * Adds a package to install as dependency of the generated project. * @param packageName The name of the package to install. * @param isDevDependency Is this package a dev dependency? */ addDependency(packageName: string, isDevDependency?: boolean): void; /** * Genrates the project. */ use(): Promise; /** * Installs all registered dependencies. */ private _installDependencies; private _updateProgressBarOperation; }