@kcinternals/nx-plugin
Version:
nx plugins for kcws internal usage
51 lines (50 loc) • 1.42 kB
TypeScript
import { type Tree } from "@nx/devkit";
export declare const createAndUpdateGeneratorsJson: (tree: Tree, generator: GeneratorInformation) => void;
interface GeneratorsJson {
generators?: Record<string, unknown>;
}
interface GeneratorsJsonInformation {
pkgPath: string;
fileExist: boolean;
filepath: string;
content: GeneratorsJson;
}
export interface GeneratorOptions {
name: string;
plugin: string;
}
export interface GeneratorInformation {
pluginName: string;
pluginRoot: string;
pluginSourceRoot: string;
name: string;
fileName: string;
propertyName: string;
className: string;
directory: string;
jsonExist: boolean;
jsonFile: string;
pkgFile: string;
}
export declare const getGeneratorInformation: (tree: Tree, options: GeneratorOptions) => Promise<GeneratorInformation>;
export interface TemplateFileOptions {
name: string;
description?: string;
plugin: string;
extra: object;
}
export declare const getTemplateFilesOptions: (generator: GeneratorInformation, options: TemplateFileOptions) => {
generator: {
fnName: string;
};
schema: {
id: string;
description: string;
interface: string;
};
name: string;
description: string;
plugin: string;
};
export declare const getGeneratorJson: (tree: Tree, root: string) => GeneratorsJsonInformation | undefined;
export {};