slack-message-parser

JavaScript library for parsing Slack message format (mrkdwn)

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
# Development guide

## Prerequisites

- Deno v1.26.x
- Node.js v16 (to publish to NPM)

## Commands

Project specific commands.
Please refer to `deno help` or [Deno's manual](https://deno.land/manual@v1.26.2/introduction) for other tasks.

### Setup git hooks

Optional but recommended, run this command or copy the files under `.githooks` into `.git/hooks`.

```sh
$ git config core.hooksPath .githooks
```

This command configures these git hooks:

- (pre-commit) Run `deno fmt --check` to check files are properly formatted.
- (pre-commit) Run `deno lint`.
- (pre-commit) Run `deno test` to run unit tests and type check.
- (pre-commit) Run `deno check scripts/build_npm.ts` to run type check for build script.

See the contents of each files to see what will be executed.

If your work directory has unstaged files, some checking process may fail.
To commit without those unstaged files, stash them before commit.

### Run unit tests

```sh
# This also performs type checking
$ deno test
```

To see test coverage:

```sh
# `coverage/` is ignored in .gitingore
# You can also use other than `coverage/` (e.g. `cov/`)
$ deno test --coverage=coverage/
$ deno coverage coverage/ --exclude=tests --exclude=_test
```