Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/src/03-explore/config-files/cmfpackage.json/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,31 @@ Properties:

The properties **source** and **target** have support for token replacement of any property of the cmfpackage.

Use `Pack` for regular file inclusion. Use `Transform` when you need to add custom properties to the UI `config.json` during packing, without replacing the out-of-the-box file. In this case, the `source` is the transform file, such as `my-transforms.json`, and the `target` value is ignored by the packer. At the moment, this action is only supported for `config.json`.

Example: add custom properties to the ui `config.json`.

```json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure the example is clear enough, as we don't show how we specify the transform should be applied to config.json

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want an example of the final config file? Already transformed?

{
"contentToPack": [
{
"source": "my-transforms.json",
"action": "Transform"
}
]
}
```

If `my-transforms.json` contains:

```json
{
"advancedCustomization": true
}
```

the generated package will apply that transformation to the ui `config.json`, preserving the existing product-managed settings and variables.

Example:

```json
Expand Down
12 changes: 10 additions & 2 deletions docs/src/03-explore/config-files/cmfpackage.json/packaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
* Pack *(default)*
* Transform

```
Use the source content to apply a transformation to another file.
This currently doesn't use the Target property, as it is handler dependent.
This is typically used to inject custom properties into a packed JSON file, such as the UI `config.json`, without overwriting the out-of-the-box file.
This currently doesn't use the `Target` property, as it is handler dependent.

Example:

```json
{
"source": "my-transforms.json",
"action": "Transform"
}
```

* Untar
Expand Down
Loading