Skip to content

Commit 955c925

Browse files
docs: local development page (#491)
* go * go * go * go * go * rename * Apply suggestions from code review Co-authored-by: Eden Zimbelman <zim@o526.net> * slack run callout * tweak --------- Co-authored-by: Eden Zimbelman <zim@o526.net>
1 parent 346be01 commit 955c925

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

docs/_sidebar.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"tools/slack-cli/guides/using-slack-cli-with-bolt-frameworks",
1818
"tools/slack-cli/guides/using-slack-cli-on-an-enterprise-grid-organization",
1919
"tools/slack-cli/guides/running-slack-cli-commands",
20+
"tools/slack-cli/guides/developing-locally",
2021
"tools/slack-cli/guides/using-environment-variables-with-the-slack-cli",
2122
"tools/slack-cli/guides/troubleshooting-slack-cli-errors",
2223
"tools/slack-cli/guides/setting-up-ci-cd-with-the-slack-cli",

docs/guides/developing-locally.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
sidebar_label: Developing locally
3+
slug: /tools/slack-cli/guides/developing-locally
4+
---
5+
6+
# Developing locally using the Slack CLI
7+
8+
The Slack CLI provides some features, and customization of said features, to streamline developing apps locally using `slack run`. This guide details those features.
9+
10+
## Configuring file watching and auto-restart
11+
12+
The Slack CLI automatically watches your app files and restarts the server when they change. It also watches `manifest.json` and reinstalls the app when the manifest changes.
13+
14+
For Bolt for Python projects, the Slack CLI watches all `.py` files from the root directory.
15+
16+
For Bolt for JavaScript projects, the Slack CLI watches all `.js` files from the root directory.
17+
18+
View the [hooks reference](/tools/slack-cli/reference/hooks#watch-configurations) for detailed configuration options.
19+
20+
### Customizing watch paths
21+
22+
You can override the default watch paths in `.slack/hooks.json` if so desired.
23+
24+
For example, if you want to watch for changes to JavaScript files in an `src` directory but not `scripts` use the following:
25+
26+
```json
27+
{
28+
"config": {
29+
"watch": {
30+
"manifest": {
31+
"paths": ["manifest.json"]
32+
},
33+
"app": {
34+
"paths": ["src/"]
35+
}
36+
}
37+
}
38+
}
39+
```
40+
41+
A restart _clears application state_. This is usually desired! Just be aware of this if you're testing workflows that require data to persist across multiple user interactions.
42+
43+
### Using a remote manifest
44+
45+
By default, the Slack CLI uses your local manifest and reinstalls the app if it changes. If you manage your manifest in App Settings, however, you'll have `manifest.source` set to `remote` in `.slack/config.json` and will need to update the manifest in App Settings.

0 commit comments

Comments
 (0)