parent
17d0dd3593
commit
b57a1275b2
@ -119,7 +119,7 @@ In either case, you must provide required inputs, but can allow other inputs to
|
||||
|
||||
You define builder inputs in a JSON schema associated with that builder.
|
||||
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.
|
||||
(The Schematics library does the same kind of validation of user input).
|
||||
(The Schematics library does the same kind of validation of user input.)
|
||||
|
||||
For our example builder, we expect the `options` value to be a `JsonObject` with two keys: a `command` that is a string, and an `args` array of string values.
|
||||
|
||||
@ -153,7 +153,7 @@ For more information, see the [JSON schemas website](http://json-schema.org/).
|
||||
|
||||
To link our builder implementation with its schema and name, we need to create a *builder definition* file, which we can point to in `package.json`.
|
||||
|
||||
Create a file named `builders.json` file that looks like this.
|
||||
Create a file named `builders.json` that looks like this:
|
||||
|
||||
<code-example language="json" header="builders.json">
|
||||
|
||||
@ -340,7 +340,7 @@ We need to update the `angular.json` file to add a target for this builder to th
|
||||
|
||||
* We'll add a new target section to the "architect" object for our project.
|
||||
|
||||
* The target named "touch" uses our builder, which we published to `@example/command-runner`. (See [Publishing your Library](guide/creating-libraries#publishing-your-library))
|
||||
* The target named "touch" uses our builder, which we published to `@example/command-runner`. (See [Publishing your Library](guide/creating-libraries#publishing-your-library).)
|
||||
|
||||
* The options object provides default values for the two inputs that we defined; `command`, which is the Unix command to execute, and `args`, an array that contains the file to operate on.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user