diff --git a/typescript-deno/README.md b/typescript-deno/README.md index c1ee086..0675ad6 100644 --- a/typescript-deno/README.md +++ b/typescript-deno/README.md @@ -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 diff --git a/typescript-deno/deno.jsonc b/typescript-deno/deno.jsonc new file mode 100644 index 0000000..0f5bbf5 --- /dev/null +++ b/typescript-deno/deno.jsonc @@ -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 + } +} diff --git a/typescript-deno/deno.lock b/typescript-deno/deno.lock new file mode 100644 index 0000000..a1f6fd9 --- /dev/null +++ b/typescript-deno/deno.lock @@ -0,0 +1,9 @@ +{ + "version": "3", + "remote": { + "https://deno.land/std@0.153.0/fmt/colors.ts": "ff7dc9c9f33a72bd48bc24b21bbc1b4545d8494a431f17894dbc5fe92a938fc4", + "https://deno.land/std@0.153.0/testing/_diff.ts": "141f978a283defc367eeee3ff7b58aa8763cf7c8e0c585132eae614468e9d7b8", + "https://deno.land/std@0.153.0/testing/_format.ts": "cd11136e1797791045e639e9f0f4640d5b4166148796cad37e6ef75f7d7f3832", + "https://deno.land/std@0.153.0/testing/asserts.ts": "d6595cfc330b4233546a047a0d7d57940771aa9d97a172ceb91e84ae6200b3af" + } +} diff --git a/typescript-deno/script/test b/typescript-deno/script/test index a2b8b47..7a2d381 100755 --- a/typescript-deno/script/test +++ b/typescript-deno/script/test @@ -2,4 +2,4 @@ set -e -deno test src +deno test src --watch