Skip to content

Commit 4aaca4d

Browse files
authored
docs: add commands for setting up and testing various examples (#16)
1 parent 800b5dc commit 4aaca4d

File tree

1 file changed

+43
-2
lines changed

1 file changed

+43
-2
lines changed

.github/MAINTAINERS_GUIDE.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# Maintainers guide
1+
# Maintainers Guide
22

33
Let's hope to have matching examples of documentation and reference for various runtimes be consistent!
44

5+
- **[Development](#development)**: Making changes alongside the Java Slack SDK.
6+
- **[Commands](#commands)**: Reference to running example code of this project.
7+
- **[Structure](#structure)**: Adding examples for features of the Slack Platform.
8+
59
## Development
610

711
Bringing ongoing changes from the [Java Slack SDK](https://github.com/slackapi/java-slack-sdk) requires [building from source](https://docs.slack.dev/tools/java-slack-sdk/guides/web-api-client-setup#build-from-source) with these commands:
@@ -12,7 +16,14 @@ $ cd java-slack-sdk
1216
$ mvn install -Dmaven.test.skip=true
1317
```
1418

15-
This adds a snapshot to the `$HOME/.m2` path that are used after updating the versions found in a `pom.xml` file.
19+
This adds a snapshot to the `$HOME/.m2` path that are used after updating the versions found in a `pom.xml` file:
20+
21+
```sh
22+
$ git clone [email protected]:slack-samples/bolt-java-examples.git
23+
$ cd bolt-java-examples
24+
$ cd block-kit # Navigate to whatever example
25+
$ vim pom.xml
26+
```
1627

1728
```diff
1829
<dependency>
@@ -22,3 +33,33 @@ This adds a snapshot to the `$HOME/.m2` path that are used after updating the ve
2233
+ <version>1.45.4-SNAPSHOT</version>
2334
</dependency>
2435
```
36+
37+
## Commands
38+
39+
Each example has matching commands to run tests:
40+
41+
```sh
42+
$ mvn --batch-mode spotless:check
43+
$ mvn --batch-mode test -Dspotless.apply.skip
44+
```
45+
46+
## Structure
47+
48+
New code snippets or samples added should match the structure of the [docs.slack.dev](https://docs.slack.dev) site:
49+
50+
```txt
51+
|- .github
52+
|- dependabot.yml # https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/controlling-dependencies-updated#defining-multiple-locations-for-manifest-files
53+
|- block-kit
54+
|- blocks # https://docs.slack.dev/reference/block-kit/blocks
55+
|- formatting # https://docs.slack.dev/block-kit/formatting-with-rich-text
56+
|- messaging
57+
|- sending # https://docs.slack.dev/messaging/sending-and-scheduling-messages
58+
|- work-objects # https://docs.slack.dev/messaging/work-objects
59+
```
60+
61+
Some pages might reference distinct examples needing unique app manifests. These should appear in separate nested directories for a minimal demonstration.
62+
63+
Certain features or demonstrations might not have a clear example on the docs site. Discussions with the kind documentation team ought be started if so! We hope folks find relevant examples through those pages.
64+
65+
A goal of this project is to be a source of tested reference.

0 commit comments

Comments
 (0)