From b2816a1536075397d876ba27ce2b7dcd785d4a39 Mon Sep 17 00:00:00 2001 From: Edric Chan Date: Mon, 25 Mar 2019 21:57:06 +0800 Subject: [PATCH] docs: typo fixes for schematics-for-libraries.md (#37753) Addresses small typos such as extra whitespaces. This change was extracted from #29505. This change was extracted from #29505. This change was extracted from #29505. PR Close #37753 --- aio/content/guide/schematics-for-libraries.md | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/aio/content/guide/schematics-for-libraries.md b/aio/content/guide/schematics-for-libraries.md index 7b9e682a3d..1590c4ea87 100644 --- a/aio/content/guide/schematics-for-libraries.md +++ b/aio/content/guide/schematics-for-libraries.md @@ -1,7 +1,7 @@ # Schematics for libraries When you create an Angular library, you can provide and package it with schematics that integrate it with the Angular CLI. -With your schematics, your users can use `ng add` to install an initial version of your library, +With your schematics, your users can use `ng add` to install an initial version of your library, `ng generate` to create artifacts defined in your library, and `ng update` to adjust their project for a new version of your library that introduces breaking changes. All three types of schematics can be part of a collection that you package with your library. @@ -115,10 +115,10 @@ When you add a schematic to the collection, you have to point to it in the colle - * *id* : A unique id for the schema in the collection. - * *title* : A human-readable description of the schema. - * *type* : A descriptor for the type provided by the properties. - * *properties* : An object that defines the available options for the schematic. + * *id*: A unique id for the schema in the collection. + * *title*: A human-readable description of the schema. + * *type*: A descriptor for the type provided by the properties. + * *properties*: An object that defines the available options for the schematic. Each option associates key with a type, description, and optional alias. The type defines the shape of the value you expect, and the description is displayed when the user requests usage help for your schematic. @@ -130,9 +130,9 @@ When you add a schematic to the collection, you have to point to it in the colle - * *name* : The name you want to provide for the created service. - * *path* : Overrides the path provided to the schematic. The default path value is based on the current working directory. - * *project* : Provides a specific project to run the schematic on. In the schematic, you can provide a default if the option is not provided by the user. + * *name*: The name you want to provide for the created service. + * *path*: Overrides the path provided to the schematic. The default path value is based on the current working directory. + * *project*: Provides a specific project to run the schematic on. In the schematic, you can provide a default if the option is not provided by the user. ### Add template files @@ -169,10 +169,9 @@ The Schematics framework provides a file templating system, which supports both The system operates on placeholders defined inside files or paths that loaded in the input `Tree`. It fills these in using values passed into the `Rule`. -For details of these data structure and syntax, see the [Schematics README](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/README.md). +For details of these data structures and syntax, see the [Schematics README](https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/README.md). - -1. Create the main file, `index.ts` and add the source code for your schematic factory function. +1. Create the main file `index.ts` and add the source code for your schematic factory function. 1. First, import the schematics definitions you will need. The Schematics framework offers many utility functions to create and use rules when running a schematic. @@ -271,7 +270,6 @@ For more information about rules and utility methods, see [Provided Rules](https After you build your library and schematics, you can install the schematics collection to run against your project. The steps below show you how to generate a service using the schematic you created above. - ### Build your library and schematics From the root of your workspace, run the `ng build` command for your library.