Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.19 KB

CONTRIBUTING.md

File metadata and controls

47 lines (32 loc) · 1.19 KB

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 for other tasks.

Setup git hooks

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

$ 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 --doc 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

# This also performs type checking
$ deno test

To see test coverage:

# `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