@o3r/schematics
Version:
Schematics module of the Otter framework
29 lines • 1.5 kB
TypeScript
import { SchematicContext } from '@angular-devkit/schematics';
import type { WorkspaceSchema, WorkspaceSchematics } from '../interfaces';
/**
* Register the collection schematic to the workspace
* @param workspace Workspace to add the collection to
* @param collection Collection to add to the workspace schematic collection
* @returns the updated workspace
*/
export declare function registerCollectionSchematics(workspace: WorkspaceSchema, collection: string): WorkspaceSchema;
/**
* Get default options for a schematic
* This will look inside angular.json file for schematics with keys containing wildcards like `*:ng-add` or `@o3r/core:*`
* @param workspace
* @param collection
* @param schematicName
* @param options
* @param options.projectName
*/
export declare function getDefaultOptionsForSchematic<T extends WorkspaceSchematics['*:*'] = WorkspaceSchematics['*:*']>(workspace: WorkspaceSchema | null, collection: string, schematicName: string, options?: {
projectName?: string | undefined;
}): T;
/**
* Retrieves the schematics options of a given schematics name
* If the schematics name is not found, then the generic options (*:*) will be returned. If the latter is not present the function returns undefined
* @param config
* @param context
*/
export declare function getSchematicOptions<T extends WorkspaceSchematics['*:*'] = WorkspaceSchematics['*:*']>(config: WorkspaceSchema, context: SchematicContext): T | undefined;
//# sourceMappingURL=collection.d.ts.map