Angular Build Architect builder for ng-packagr library packaging (deprecated)
89
Create a custom Angular Architect builder that validates configuration files. The builder should integrate with the Angular Architect system and support its flexible return type patterns.
Your builder should:
The builder must:
configPath property (string, required)success property (boolean) and optional error property (string)@generates
import { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
/**
* Options for the custom builder
*/
export interface CustomBuilderOptions {
configPath: string;
}
/**
* Execute the custom builder
* @param options - Builder options
* @param context - Builder context
* @returns Build result (supports Observable, Promise, or AsyncIterable patterns)
*/
export function executeCustomBuilder(
options: CustomBuilderOptions,
context: BuilderContext
): Promise<BuilderOutput>;{ success: true } @test{ success: false, error: "Config file not found" } @test{"name": "test"}, the builder succeeds and logs the configuration name @test{ success: false, error: "Invalid JSON in config file" } @testProvides the Builder Context and Builder Output types for Angular Architect integration.
@satisfied-by
Provides Observable support for reactive builder patterns.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-angular-devkit--build-ng-packagrdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10