Skip to content

Commit

Permalink
docs(manifest.md): moved switch clauses to enhanced yaml syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
horw committed Feb 23, 2024
1 parent fcaf040 commit c7c980c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,13 @@ Low-level dependencies, are components or files that are used by many others. Fo

To disable the build-apps-only-on-related-changes feature, you can use the CLI option `--ignore-app-dependencies-filepatterns`. Once any of the modified files matches the specified patterns, the special rules will be disabled. All apps will be built, no exceptions.

## `switch` Clauses
## Enhanced YAML Syntax

### `switch` Clauses

The `switch` clauses are supported by two keywords in the YAML file: `depends_components` and `depends_filepatterns`.

### Operands
#### Operands

Switch cases have two main components: the `if` clause and the `default` clause. Just like a switch statement in c language, The first matched `if` clause will be applied. If no `if` clause matched, the `default` clause will be applied. Here's an example:

Expand All @@ -197,12 +199,10 @@ test1:

`default` clause is optional. If you don't specify any `default` clause, it will return an empty array.

### Limitations
#### Limitations

You cannot combine a list and a switch in one node.

## Enhanced YAML Syntax

### Reuse Lists

To reuse the items defined in a list, you can use the `+` and `-` postfixes respectively. The order of calculation is always `+` first, followed by `-`.
Expand Down

0 comments on commit c7c980c

Please sign in to comment.