|
|
||
|---|---|---|
| public | ||
| test | ||
| types | ||
| README.md | ||
| deno.json | ||
| deno.lock | ||
README.md
Formats Exposed
To develop, start a static file server in public/. There is no build step.
To deploy, copy the files from public/ to a static file host.
To run tests, run deno test.
To format code, run deno fmt.
To lint, run deno lint.
To run type checks, run deno task typecheck.
To run all checks (tests, linting, code formatting, and type checks), run
deno task check-all.
Code style
- Make sure all checks pass with
deno task check-all. - Prefer arrow functions.
throwshould be used when the developer makes a mistake, not for "expected" errors. For example, if someone uploads a bogus file, that shouldn't throw an error.- Bad news first:
- If a function returns
nullif an error case, define the typenull | Result, notResult | type. - Test error cases first.
- If a function returns