@adonisjs/ace
Version:
A CLI framework for Node.js
32 lines (31 loc) • 843 B
TypeScript
/**
* The index generator creates a commands loader that can be lazily imported.
*
* Also, a commands.json index file is created that has metadata for all
* the files. Doing so speeds up commands lookup, as we do not
* have to import all the classes just to find if a command exists or not.
*
* @example
* ```ts
* const generator = new IndexGenerator('./build/commands')
* await generator.generate()
* ```
*/
export declare class IndexGenerator {
#private;
/**
* Create a new index generator
*
* @param commandsDir - The directory containing command files
*/
constructor(commandsDir: string);
/**
* Generate the commands index files (commands.json, main.js, main.d.ts)
*
* @example
* ```ts
* await generator.generate()
* ```
*/
generate(): Promise<any>;
}