Skip to content

Improve Deno project #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions typescript-deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@ If using VSCode, you might want to enable the extension in the settings:
```jsonc
// .vscode/settings.json
{
"deno.enable": true
"deno.enable": true,
// or specifically
"deno.enablePaths": ["./typescript-deno"]
}
```

## Usage

- `./script/start` to run your code
- `./script/start` to run the tests

### Other commands

- `deno run src/exerciste.ts --watch` will re-run [`mod.ts`](./src/mod.ts) on every
file change, for quick development feedback.
- `deno test src --watch` will re-run [`mod.test.ts`](./src/mod.test.ts) on every file
change, for quick development feedback.
- `./script/start` to run the source code
- `./script/test` to run the tests in watch mode

## Structure

Expand Down
13 changes: 13 additions & 0 deletions typescript-deno/deno.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tasks": {
"start": "./script/start",
"test": "./script/test"
},
// https://github.com/guardian/csnx/blob/1be3fd98ed527ccf0f1b8e21f10039e23fdb3fb7/libs/%40guardian/tsconfig/tsconfig.json
"compilerOptions": {
"noImplicitReturns": true,
"noUncheckedIndexedAccess": false, // disabled to prevent errors in C-style loops: https://github.com/guardian/coding-exercise-project/pull/111#discussion_r1481440786
"noUnusedLocals": true,
"strict": true
}
}
9 changes: 9 additions & 0 deletions typescript-deno/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion typescript-deno/script/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

deno test src
deno test src --watch