Skip to content

Commit cc8e5b7

Browse files
committed
docs: changeset
1 parent 14899a9 commit cc8e5b7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.changeset/green-items-write.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
"@slack/cli-hooks": minor
3+
---
4+
5+
feat(cli-hooks): add default app and manifest watch config
6+
7+
This package now provides default watch configurations for automatic file watching during [`slack run`](https://docs.slack.dev/tools/slack-cli/reference/commands/slack_platform_run). The CLI will restart your app server when source files change and reinstall your app when the manifest changes.
8+
9+
**Requirements:** These features require Slack CLI v3.12.0+ with [file watching support](https://github.com/slackapi/slack-cli/pull/310).
10+
11+
### Default Configuration
12+
13+
The following watch settings are provided automatically when using this package:
14+
15+
```json
16+
{
17+
"config": {
18+
"watch": {
19+
"app": {
20+
"filter-regex": "\\.js$",
21+
"paths": ["."]
22+
},
23+
"manifest": {
24+
"filter-regex": "^manifest\\.json$",
25+
"paths": ["manifest.json"]
26+
}
27+
}
28+
}
29+
}
30+
```
31+
32+
- **app**: Watches for JavaScript file changes to restart the app server
33+
- **manifest**: Watches the manifest file for changes to reinstall the app
34+
35+
### Custom Configurations
36+
37+
You can override these defaults in your `.slack/hooks.json` file to reduce the paths searched or change the file patterns. Read [Watch Configurations](https://docs.slack.dev/tools/slack-cli/reference/hooks/#watch-configurations) for more options.
38+
39+
### TypeScript Development
40+
41+
TypeScript developers should run `tsc --watch` in a separate terminal during development. This compiles `.ts` files to `.js` on changes, and the default watch configuration will detect changes to the compiled `dist/*.js` files and restart the app server. This approach works best with the default settings.

0 commit comments

Comments
 (0)