You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
Better separation of concern between tooling and schematic library.
Engine, Collection and Schematic now take a generic type that can add tooling-specific metadata to each
parts, in a type-safe manner.
Context exposed to schematics is a context of <any, any>, while the tool should use TypedContext for
better support internally.
The Engine Host now only deals with Descriptions of collection and
schematics, does not deal with actual implementation.
Renamed CliEngineHost to NodeModules, since its kind of reusable if you only implement a NodeModules
schematic tool. Tempted to move this into the schematics library as its highly reusable.
Copy file name to clipboardExpand all lines: packages/schematics/README.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,11 @@ The tooling is responsible for the following tasks:
31
31
1. Create a Sink and commit the result of the schematics to the Sink. Many sinks are provided by the library; FileSystemSink and DryRunSink are examples.
32
32
1. Output any logs propagated by the library, including debugging information.
33
33
34
+
The tooling API is composed of the following pieces:
35
+
36
+
## Engine
37
+
The `SchematicEngine` is responsible for loading and constructing `Collection`s and `Schematics`'. When creating an engine, the tooling provides an `EngineHost` interface that understands how to create a `CollectionDescription` from a name, and how to create a `Schematic
38
+
34
39
# Examples
35
40
36
41
## Simple
@@ -50,7 +55,7 @@ export default function MySchematic(options: any) {
50
55
A few things from this example:
51
56
52
57
1. The function receives the list of options from the tooling.
53
-
2. It returns a [`Rule`](src/engine/interface.ts#L73), which is a transformation from a `Tree` to another `Tree`.
58
+
1. It returns a [`Rule`](src/engine/interface.ts#L73), which is a transformation from a `Tree` to another `Tree`.
0 commit comments