Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TeamsFx-preview-and-customize-app-manifest.md #11551

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,14 @@ For example, you can put your manifest.json file in `test/test.json`, and update
1. You can define your own environment variables. The default manifest.json contains some placeholders with format of ${{xx_xx}}. You can define your own environment variables and add placeholders in the manifest.json file.
For example, you can customize app description by defining a new environment variable in env/.env.xx file, and update manifest.json with corresponding placeholder.

`.env.dev`
`.env.dev`

```text
TEAMS_APP_DESCRIPTION=This is an amazing app
```
```text
TEAMS_APP_DESCRIPTION=This is an amazing app
```
`manifest.json`

`manifest.json`

```json
```json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
"manifestVersion": "1.16",
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -76,7 +75,52 @@ For example, you can customize app description by defining a new environment var
"full": "Full description of tab0418"
},
}
```
```

1. Starting with Teams Toolkit 5.10, using the `file` function you can store the value of a field, such as a lengthy or multiline app description, in a separate text file. For example, create a `description.txt` file in the parent folder of `manifest.json` to store your app's complete description. Then, set the value of `description.full` in `manifest.json` as `$[file('description.txt')]`. Teams Toolkit will read the content from the text file and use it as full description when building an app package.
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved

`description.txt`

```text
This is the full description.
```

`manifest.json`

```json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
"manifestVersion": "1.16",
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
"description": {
"short": "Short description of tab",
"full": "$[file('./description.txt')]"
},
}
```

You could either put the file path in env/.env.xx and update the input parameter function of file function to placeholder in ${{xx_xx}} format.
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved


`.env.dev`

```text
DESCRIPTION_PATH=./description.txt
```

`manifest.json`

```json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
"manifestVersion": "1.16",
yuqizhou77 marked this conversation as resolved.
Show resolved Hide resolved
"description": {
"short": "Short description of tab",
"full": "$[file(${{DESCRIPTION_PATH}})]"
},
}
```



## Validate your app

Expand Down