Skip to content

Commit

Permalink
chore: use 'deno task' instead of 'vr'
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakovlenko committed Jul 24, 2024
1 parent 832941d commit f20af0f
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 34 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ jobs:
- uses: denolib/setup-deno@v2
with:
deno-version: v1.x
- name: Install Velociraptor
run: deno install -qA -n vr https://deno.land/x/velociraptor@$VERSION/cli.ts
env:
VERSION: 1.0.0-beta.18
- name: Run tests
run: >
vr test-cov
deno task test-cov
- name: Upload coverage
uses: coverallsapp/[email protected]
with:
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

![](https://github.com/ayakovlenko/typescriptlings/actions/workflows/test.yml/badge.svg)
[![](https://coveralls.io/repos/github/ayakovlenko/typescriptlings/badge.svg?branch=main)](https://coveralls.io/github/ayakovlenko/typescriptlings?branch=main)
[![vr scripts](https://badges.velociraptor.run/flat.svg)](https://velociraptor.run)

This project contains small exercises to get you used to reading and writing
TypeScript code. This includes reading and responding to compiler messages.
Expand All @@ -16,25 +15,22 @@ Heavily inspired by [rustlings](https://github.com/rust-lang/rustlings).
The project uses Deno as a TypeScript runtime, so you need to
[install](https://deno.land/#installation) it first.

Then, [install](https://github.com/jurassiscripts/velociraptor#install)
Velociraptor to run the scripts.

### ready to run 🚀

```
vr start
deno task start
```

## development

Run tests:

```
vr test
deno task test
```

Before submitting a PR:

```
vr pr-fix
deno task pr-fix
```
9 changes: 9 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tasks": {
"start": "deno run --allow-run --allow-read --allow-hrtime src/main.ts",
"test": "deno test --allow-run",
"test-cov": "deno test --allow-run --coverage=./cov && deno coverage --lcov ./cov > cov.lcov",
"lint": "deno lint",
"pr-fix": "deno fmt && deno task lint && deno task test"
}
}
23 changes: 23 additions & 0 deletions deno.lock

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

2 changes: 2 additions & 0 deletions exercises/test/test_1.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// deno-lint-ignore-file

console.lg("hello world");

export {};
Expand Down
2 changes: 2 additions & 0 deletions exercises/test/test_2.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// deno-lint-ignore-file

const x = parseInt(42);

console.log(x);
Expand Down
2 changes: 2 additions & 0 deletions exercises/test/test_3.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// deno-lint-ignore-file

const fn = (a: number, b: number): void => a + b;

const a = 1;
Expand Down
2 changes: 2 additions & 0 deletions exercises/test/test_4.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// deno-lint-ignore-file

interface Person {
firstName: string;
lastName: string;
Expand Down
22 changes: 0 additions & 22 deletions scripts.yaml

This file was deleted.

0 comments on commit f20af0f

Please sign in to comment.