If you are not sure if the website you would like to visit is secure, you can verify it here. Enter the website address of the page and see parts of its content and the thumbnail images on this site. None (if any) dangerous scripts on the referenced page will be executed. Additionally, if the selected site contains subpages, you can verify it (review) in batches containing 5 pages.
favicon.ico: angular.dev/tools/cli/cli-builder - Angular CLI builders  Angular.

site address: angular.dev/tools/cli/cli-builder redirected to: angular.dev/tools/cli/cli-builder

site title: Angular CLI builders Angular

Our opinion (on Wednesday 18 November 2026 19:40:46 UTC):

GREEN status (no comments) - no comments
After content analysis of this website we propose the following hashtags:



Meta tags:
description=The web development framework for building modern apps.;
author=;
keywords=Angular framework, TypeScript, web development, hydration, Signals, standalone components, accessibility, performance;

Headings (most frequently used words):

builder, src, my, ts, json, angular, builders, target, cli, input, and, community, handling, output, progress, status, reporting, configuration, on, this, page, creating, schedule, run, testing, summary, social, media, resources, translations, project, structure, skeleton, validation, schema, package, report, default, architect, adding, running, the, spec, watch, mode, strings,

Text of the page (most frequently used words):
the (189), builder (99), #angular (58), and (49), json (47), file (44), for (40), architect (38), options (38), cli (32), copy (31), #builders (30), you (29), that (28), can (27), package (27), configuration (26), from (26), target (25), this (24), run (23), context (23), with (22), source (22), example (18), new (18), schema (18), your (17), object (17), destination (17), test (16), build (16), string (16), command (15), src (15), default (15), use (14), error (14), function (13), return (13), are (13), values (13), which (11), using (10), await (10), import (10), our (10), project (10), watch (9), builderoutput (9), files (9), create (9), code (8), type (8), name (8), devkit (8), input (8), status (8), should (7), observable (7), such (7), following (7), definition (7), logic (6), specified (6), other (6), task (6), when (6), running (6), used (6), output (6), progress (6), testing (6), section (6), configurations (6), copyfile (6), tool (6), jsonobject (6), success (6), err (6), google (5), report (5), option (5), line (5), number (5), mode (5), also (5), handler (5), same (5), arguments (5), spec (5), helpful (5), const (5), information (5), architecthost (5), will (5), testingarchitecthost (5), workspace (5), let (5), copies (5), inputs (5), add (5), true (5), see (5), method (5), commands (5), schematics (5), message (5), promise (5), buildercontext (5), createbuilder (5), built (4), developer (4), executes (4), have (4), further (4), external (4), targets (4), api (4), provides (4), behavior (4), either (4), compiler (4), stop (4), two (4), runs (4), event (4), called (4), into (4), each (4), another (4), not (4), but (4), some (4), need (4), its (4), async (4), uses (4), validation (4), override (4), value (4), defined (4), named (4), production (4), index (4), application (4), overrides (4), scheduletarget (4), invoke (4), directly (4), pass (4), given (4), specific (4), logger (4), process (4), copyfilebuilder (4), v22 (3), returns (3), teardown (3), tests (3), execute (3), once (3), schedule (3), custom (3), builderrun (3), any (3), calls (3), executed (3), scheduled (3), might (3), entirely (3), like (3), there (3), node (3), associated (3), __dirname (3), path (3), registry (3), takes (3), current (3), core (3), here (3), validates (3), scheduler (3), implementation (3), configured (3), existing (3), copying (3), aot (3), tsconfig (3), main (3), dist (3), npm (3), resolves (3), against (3), more (3), then (3), optional (3), set (3), environments (3), must (3), these (3), provide (3), reportstatus (3), false (3), catch (3), try (3), reporting (3), could (3), what (3), total (3), how (3), tools (3), docs (3), folder (3), server (3), updated (3), licensed (2), under (2), style (2), community (2), github (2), youtube (2), clean (2), integration (2), defaults (2), overwritten (2), synchronous (2), asynchronous (2), events (2), was (2), stopped (2), unsubscribes (2), system (2), changes (2), ends (2), reportrunning (2), watching (2), finishes (2), details (2), phases (2), separate (2), long (2), always (2), again (2), until (2), sourcecontent (2), destinationcontent (2), expect (2), utf8 (2), readfile (2), copied (2), memory (2), since (2), keeping (2), result (2), schedulebuilder (2), multiple (2), contains (2), join (2), directory (2), those (2), case (2), promises (2), creates (2), still (2), projects (2), published (2), tells (2), optimization (2), html (2), outputpath (2), looks (2), only (2), install (2), publishing (2), library (2), through (2), calling (2), overwriting (2), passed (2), all (2), first (2), argument (2), passes (2), environment (2), myapp (2), perform (2), now (2), part (2), dependencies (2), description (2), version (2), find (2), https (2), define (2), similar (2), failed (2), operation (2), know (2), generate (2), functions (2), handling (2), standard (2), problem (2), additional (2), export (2), extends (2), interface (2), user (2), creating (2), structure (2), top (2), contain (2), own (2), field (2), provided (2), internal (2), building (2), serving (2), errors (2), libraries (2), end (2), apps (2), workers (2), service (2), animations (2), release (2), setup (2), menu (2), super, powered, 2010, 2026, documentation, sha, 1a2e59b, mit, license, 正體中文版, 简体中文版, 日本語版, 한국어, русский, türkçe, oʻzbekcha, français, español, azərbaycanca, translations, roadmap, press, kit, resources, experts, devlibrary, issues, conduct, contribute, stack, overflow, discord, bluesky, formerly, twitter, blog, social, media, team, recommends, unit, validate, alternate, flags, means, changing, summary, fully, completed, needs, times, completion, between, stream, restarts, being, performed, invoking, emits, general, three, exit, allows, builds, cleaned, emit, after, execution, been, enter, triggered, triggers, restart, tell, prevents, stopping, subscribes, completes, reuse, most, however, compatible, watches, devserver, support, things, look, out, repo, avoid, renaming, tobe, states, keep, waiting, stops, member, next, outputs, addbuilderfrompackage, take, don, both, directories, transforms, addundefineddefaults, addposttransform, coreschemaregistry, beforeeach, describe, contents, instances, jsonschemaregistry, instead, because, did, different, want, adding, app, browser, generated, something, publish, simple, puts, validated, without, adjustment, resulting, valid, taking, control, typically, schedules, tasks, asynchronously, resolution, complete, read, parse, utility, targetfromtargetstring, generic, form, strings, flag, specify, individually, outputhashing, prod, replace, filereplacements, has, configures, serve, specifies, alternative, resolve, associates, accessed, official, second, key, where, link, point, minimal, very, powerful, schemas, website, properties, org, keys, collects, resolved, their, types, before, passing, them, indirectly, required, pre, done, empty, remove, guarantee, shown, cut, fit, displays, executing, parent, would, going, length, many, processed, far, unmodified, unless, reportprogress, includes, hints, certain, interfaces, retrieve, instance, does, print, anything, occurs, difficult, understand, exactly, trying, occurred, logging, lets, itself, even, deactivated, retrieves, paths, fails, about, underlying, skeleton, location, typescript, npmjs, com, purpose, resides, global, level, mybuilder, found, extend, customize, boolean, addition, contextual, access, scheduling, while, automatically, separation, concerns, touch, delegates, work, receives, back, arrow_upward_alt, page, examples, repository, document, explains, integrate, shows, complex, bundler, runner, accomplish, desired, change, third, party, metadata, ahead, time, compilation, template, checking, authoring, generating, migrating, deployment, development, local, overview, arrow_back, material, cdk, player, pay, maps, fire, tailwind, pipeline, web, pwas, rxjs, legacy, ngmodules, extended, ecosystem, v21, date, performance, unhandled, accessibility, security, guide, best, practices, language, devtools, webmcp, design, patterns, tutor, mcp, agent, skills, llm, prompts, ide, get, started, drag, drop, internationalization, aria, side, hybrid, rendering, http, client, forms, routing, dependency, injection, directives, templates, components, signals, depth, guides, start, coding, essentials, installation, introduction, more_horiz, reference, playground, tutorials, close, skip, content,


Text of the page (random words):
ons options context buildercontext promise builderoutput now let s add some logic to it the following code retrieves the source and destination file paths from user options and copies the file from the source to the destination using the promise version of the built in node js copyfile function if the copy operation fails it returns an error with a message about the underlying problem src my builder ts builder import buildercontext builderoutput createbuilder from angular devkit architect import jsonobject from angular devkit core import promises as fs from fs interface options extends jsonobject source string destination string export default createbuilder copyfilebuilder async function copyfilebuilder options options context buildercontext promise builderoutput try await fs copyfile options source options destination catch err return success false error err as error message return success true handling output by default copyfile does not print anything to the process standard output or error if an error occurs it might be difficult to understand exactly what the builder was trying to do when the problem occurred add some additional context by logging additional information using the logger api this also lets the builder itself be executed in a separate process even if the standard output and error are deactivated you can retrieve a logger instance from the context src my builder ts handling output try await fs copyfile options source options destination catch err context logger error failed to copy file return success false error err as error message progress and status reporting the cli builder api includes progress and status reporting tools which can provide hints for certain functions and interfaces to report progress use the context reportprogress method which takes a current value optional total and status string as arguments the total can be any number for example if you know how many files you have to process the total could be the number of files and current should be the number processed so far the status string is unmodified unless you pass in a new string value in our example the copy operation either finishes or is still executing so there s no need for a progress report but you can report status so that a parent builder that called our builder would know what s going on use the context reportstatus method to generate a status string of any length helpful there s no guarantee that a long string will be shown entirely it could be cut to fit the ui that displays it pass an empty string to remove the status src my builder ts progress reporting context reportstatus copying options source to options destination try await fs copyfile options source options destination catch err context logger error failed to copy file return success false error err as error message context reportstatus done return success true builder input you can invoke a builder indirectly through a cli command such as ng build or directly with the angular cli ng run command in either case you must provide required inputs but can let other inputs default to values that are pre configured for a specific target specified by a configuration or set on the command line input validation you define builder inputs in a json schema associated with that builder similar to schematics the architect tool collects the resolved input values into an options object and validates their types against the schema before passing them to the builder function for our example builder options should be a jsonobject with two keys a source and a destination each of which are a string you can provide the following schema for type validation of these values schema json schema https json schema org schema type object properties source type string destination type string helpful this is a minimal example but the use of a schema for validation can be very powerful for more information see the json schemas website to link our builder implementation with its schema and name you need to create a builder definition file which you can point to in package json create a file named builders json that looks like this builders json builders copy implementation dist my builder js schema src schema json description copies a file in the package json file add a builders key that tells the architect tool where to find our builder definition file package json name example copy file version 1 0 0 description builder for copying files builders builders json dependencies angular build 21 2 0 the official name of our builder is now example copy file copy the first part of this is the package name and the second part is the builder name as specified in the builders json file these values are accessed on options source and options destination src my builder ts report status await fs copyfile options source options destination target configuration a builder must have a defined target that associates it with a specific input configuration and project targets are defined in the angular json cli configuration file a target specifies the builder to use its default options configuration and named alternative configurations architect in the angular cli uses the target definition to resolve input options for a given run the angular json file has a section for each project and the architect section of each project configures targets for builders used by cli commands such as build test and serve by default for example the ng build command runs the builder angular build application to perform the build task and passes in default option values as specified for the build target in angular json angular json myapp architect build builder angular build application options outputpath dist myapp index src index html configurations production filereplacements replace src environments environment ts with src environments environment prod ts optimization true outputhashing all the command passes the builder the set of default options specified in the options section if you pass the configuration production flag it uses the override values specified in the production configuration specify further option overrides individually on the command line target strings the generic ng run cli command takes as its first argument a target string of the following form project target configuration details project the name of the angular cli project that the target is associated with target a named builder configuration from the architect section of the angular json file configuration optional the name of a specific configuration override for the given target as defined in the angular json file if your builder calls another builder it might need to read a passed target string parse this string into an object by using the targetfromtargetstring utility function from angular devkit architect schedule and run architect runs builders asynchronously to invoke a builder you schedule a task to be run when all configuration resolution is complete the builder function is not executed until the scheduler returns a builderrun control object the cli typically schedules tasks by calling the context scheduletarget function and then resolves input options using the target definition in the angular json file architect resolves input options for a given target by taking the default options object then overwriting values from the configuration then further overwriting values from the overrides object passed to context scheduletarget for the angular cli the overrides object is built from command line arguments architect validates the resulting options values against the schema of the builder if inputs are valid architect creates the context and executes the builder for more information see workspace configuration helpful you can also invoke a builder directly from another builder or test by calling context schedulebuilder you pass an options object directly to the method and those option values are validated against the schema of the builder without further adjustment only the context scheduletarget method resolves the configuration and overrides through the angular json file default architect configuration let s create a simple angular json file that puts target configurations into context you can publish the builder to npm see publishing your library and install it using the following command npm install example copy file if you create a new project with ng new builder test the generated angular json file looks something like this with only default builder configurations angular json projects builder test architect build builder angular build application options outputpath dist builder test index src index html browser src main ts tsconfig tsconfig app json configurations production optimization true aot true adding a target add a new target that will run our builder to copy a file this target tells the builder to copy the package json file we will add a new target section to the architect object for our project the target named copy package uses our builder which you published to example copy file the options object provides default values for the two inputs that you defined source the existing file you are copying destination the path you want to copy to angular json projects builder test architect copy package builder example copy file copy options source package json destination package copy json existing targets running the builder to run our builder with the new target s default configuration use the following cli command ng run builder test copy package this copies the package json file to package copy json use command line arguments to override the configured defaults for example to run with a different destination value use the following cli command ng run builder test copy package destination package other json this copies the file to package other json instead of package copy json because you did not override the source option it will still copy from the default package json file testing a builder use integration testing for your builder so that you can use the architect scheduler to create a context as in this example in the builder source directory create a new test file my builder spec ts the test creates new instances of jsonschemaregistry for schema validation testingarchitecthost an in memory implementation of architecthost and architect here s an example of a test that runs the copy file builder the test uses the builder to copy the package json file and validates that the copied file s contents are the same as the source src my builder spec ts import architect from angular devkit architect import testingarchitecthost from angular devkit architect testing import schema from angular devkit core import promises as fs from fs import join from path describe copy file builder let architect architect let architecthost testingarchitecthost beforeeach async const registry new schema coreschemaregistry registry addposttransform schema transforms addundefineddefaults testingarchitecthost takes workspace and current directories since we don t use those both are the same in this case architecthost new testingarchitecthost __dirname __dirname architect new architect architecthost registry this will either take a node package name or a path to the directory for the package json file await architecthost addbuilderfrompackage join __dirname it can copy files async a run can have multiple outputs and contains progress information const run await architect schedulebuilder example copy file copy source package json destination package copy json the result member of type builderoutput is the next output const output await run result stop the builder from running this stops architect from keeping the builder associated states in memory since builders keep waiting to be scheduled await run stop expect that the copied file is the same as its source const sourcecontent await fs readfile package json utf8 const destinationcontent await fs readfile package copy json utf8 expect destinationcontent tobe sourcecontent helpful when running this test in your repo you need the ts node package you can avoid this by renaming my builder spec ts to my builder spec js watch mode most builders to run once and return however this behavior is not entirely compatible with a builder that watches for changes like a devserver for example architect can support watch mode but there are some things to look out for to be used with watch mode a builder handler function should return an observable architect subscribes to the observable until it completes and might reuse it if the builder is scheduled again with the same arguments the builder should always emit a builderoutput object after each execution once it s been executed it can enter a watch mode to be triggered by an external event if an event triggers it to restart the builder should execute the context reportrunning function to tell architect that it is running again this prevents architect from stopping the builder if another run is scheduled when your builder calls builderrun stop to exit watch mode architect unsubscribes from the builder s observable and calls the builder s teardown logic to clean up this behavior also allows for long running builds to be stopped and cleaned up in general if your builder is watching an external event you should separate your run into three phases phases details running the task being performed such as invoking a compiler this ends when the compiler finishes and your builder emits a builderoutput object watching between two runs watch an external event stream for example watch the file system for any changes this ends when the compiler restarts and context reportrunning is called completion either the task is fully completed such as a compiler which needs to run a number of times or the builder run was stopped using builderrun stop architect executes teardown logic and unsubscribes from your builder s observable summary the cli builder api provides a means of changing the behavior of the angular cli by using builders to execute custom logic builders can be synchronous or asynchronous execute once or watch for external events and can schedule other builders or targets builders have option defaults specified in the angular json configuration file which can be overwritten by an alternate configuration for the target and further overwritten by command line flags the angular team recommends that you use integration tests to test architect builders use unit tests to validate the logic that the builder executes if your builder returns an observable it should clean up the builder in the teardown logic of that observable social media blog x formerly twitter bluesky youtube discord github stack overflow community contribute code of conduct report issues google s devlibrary angular google developer experts resources press kit roadmap community translations azərbaycanca español français oʻzbekcha türkçe русский 한국어 日本語版 简体中文版 正體中文版 super powered by google 2010 2026 code licensed under an ...
Thumbnail images (randomly selected): * Images may be subject to copyright.GREEN status (no comments)

    No Images


    Verified site has: 49 subpage(s). Do you want to verify them? Verify pages:

    1-5 6-10 11-15 16-20 21-25 26-30 31-35 36-40 41-45 46-49


    The site also has references to the 2 subdomain(s)

      material.angular.dev  Verify   blog.angular.dev  Verify


    The site also has 2 references to other resources (not html/xhtml )

     angular.dev/ai  Verify  docs.npmjs.com/files/package.json  Verify


    Top 50 hastags from of all verified websites.

    Supplementary Information (add-on for SEO geeks)*- See more on header.verify-www.com

    Header

    HTTP/1.1 301 Moved Permanently
    Connection close
    Content-Length 0
    Server Varnish
    Retry-After 0
    Location htt????/angular.dev/tools/cli/cli-builder
    Accept-Ranges bytes
    Date Wed, 18 Nov 2026 19:40:46 GMT
    X-Served-By cache-rtm-ehrd2290044-RTM
    X-Cache HIT
    X-Cache-Hits 0
    X-Timer S1795030846.359741,VS0,VE0
    alt-svc h3= :443 ;ma=86400,h3-29= :443 ;ma=86400,h3-27= :443 ;ma=86400
    HTTP/2 200
    cache-control max-age=3600
    content-encoding gzip
    content-type text/html; charset=utf-8
    cross-origin-embedder-policy credentialless
    cross-origin-opener-policy same-origin
    etag 4c0dd897223589df035e073de89095eb371cf2098a041fc9767755787e8a0869
    last-modified Wed, 18 Nov 2026 18:41:39 GMT
    strict-transport-security max-age=31556926
    accept-ranges bytes
    date Wed, 18 Nov 2026 19:40:46 GMT
    x-served-by cache-lcy-egml8630081-LCY
    x-cache MISS
    x-cache-hits 0
    x-timer S1795030846.392045,VS0,VE165
    vary x-fh-requested-host, accept-encoding
    alt-svc h3= :443 ;ma=86400,h3-29= :443 ;ma=86400,h3-27= :443 ;ma=86400
    content-length 38822

    Meta Tags

    title="Angular CLI builders Angular"
    charset="utf-8"
    name="viewport" content="width=device-width, initial-scale=1"
    name="description" content="The web development framework for building modern apps."
    name="author" content="Angular Team"
    name="keywords" content="Angular framework, TypeScript, web development, hydration, Signals, standalone components, accessibility, performance"
    name="apple-mobile-web-app-title" content="Angular"
    name="application-name" content="Angular"
    name="theme-color" content="#ffffff"
    property="og:type" content="website"
    property="og:url" content="htt????/angular.dev/"
    property="og:title" content="Angular CLI builders • Angular"
    property="og:description" content="The web development framework for building modern apps."
    property="og:image" content="htt????/angular.dev/assets/images/ng-image.jpg"
    name="twitter:site" content="@Angular"
    name="twitter:creator" content="@Angular"
    property="twitter:card" content="summary_large_image"
    property="twitter:url" content="htt????/angular.dev/"
    property="twitter:title" content="Angular CLI builders • Angular"
    property="twitter:description" content="The web development framework for building modern apps."
    property="twitter:image" content="htt????/angular.dev/assets/images/ng-image.jpg"

    Load Info

    page size38822
    load time (s)0.231716
    redirect count1
    speed download168060
    server IP 199.36.158.100
    * all occurrences of the string "http://" have been changed to "htt???/"