Function: writeTeam()
writeTeam(
catalogDir): (team,options) =>Promise<void>
Defined in: teams.ts:105
Write a team to EventCatalog.
Parameters
| Parameter | Type |
|---|---|
catalogDir | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
team | Team |
options | { override: boolean; } |
options.override? | boolean |
Returns
Promise<void>
Example
import utils from '@eventcatalog/utils';
const { writeTeam } = utils('/path/to/eventcatalog');
// Write a team to the catalog
// team would be written to teams/EventCatalogCoreTeam
await writeTeam({
id: 'eventcatalog-core-team',
name: 'EventCatalogCoreTeam',
members: ['dboyne', 'asmith', 'msmith'],
email: 'test@test.com',
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
});
// Write a team to the catalog and override the existing content (if there is any)
await writeTeam({
id: 'eventcatalog-core-team',
name: 'EventCatalogCoreTeam',
members: ['dboyne', 'asmith', 'msmith'],
email: 'test@test.com',
slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
}, { override: true });