Skip to content

Commit 1b97b37

Browse files
committed
Upgraded to latest TS CLI
1 parent ddca23d commit 1b97b37

File tree

3 files changed

+95
-38
lines changed

3 files changed

+95
-38
lines changed

README.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,41 @@
44

55
This Zod tutorial will give you everything you ever needed to know about [Zod](https://github.com/colinhacks/zod) - an amazing library for building type-safe AND runtime-safe applications.
66

7-
## Quickstart
8-
97
```sh
108
# Installs all dependencies
119
npm install
1210

13-
# Starts the first exercise
14-
npm run exercise 01
15-
16-
# Runs linting and tests on the solution
17-
npm run solution 01
11+
# Asks you which exercise you'd like to run, and runs it
12+
npm run exercise
1813
```
1914

20-
## How to take the tutorial
15+
## How to take the course
2116

22-
You'll notice that the tutorial is split into exercises. Each exercise is split into a `*.problem.ts` and a `*.solution.ts`.
17+
You'll notice that the course is split into exercises. Each exercise is split into a `*.problem` and a `*.solution`.
2318

2419
To take an exercise:
2520

26-
1. Go into `*.problem.ts`
27-
2. Run `npm run exercise 01`, where `01` is the number of the exercise you're on.
21+
1. Run `npm run exercise`
22+
2. Choose which exercise you'd like to run.
2823

29-
The `exercise` script will run TypeScript typechecks and a test suite on the exercise.
24+
This course encourages **active, exploratory learning**. In the video, I'll explain a problem, and **you'll be asked to try to find a solution**. To attempt a solution, you'll need to:
3025

31-
This tutorial encourages **active, exploratory learning**. In the video, I'll explain a problem, and **you'll be asked to try to find a solution**. To attempt a solution, you'll need to:
32-
33-
1. Look for any 🕵️‍♂️ emojis to give you a hint on what to change
34-
1. Check out [Zod's docs](https://zod.dev)
26+
1. Check out [Zod's docs](https://zod.dev/).
3527
1. Try to find something that looks relevant.
3628
1. Give it a go to see if it solves the problem.
3729

3830
You'll know if you've succeeded because the tests will pass.
3931

40-
**If you succeed**, or **if you get stuck**, check out the `*.solution.ts`. You can see if your solution is better or worse than mine!
41-
42-
You can run `npm run solution 01` to run the tests and typechecking on the solution.
32+
**If you succeed**, or **if you get stuck**, unpause the video and check out the `*.solution`. You can see if your solution is better or worse than mine!
4333

4434
## Acknowledgements
4535

4636
Say thanks to Matt on [Twitter](https://twitter.com/mattpocockuk) or by joining his [Discord](https://discord.gg/8S5ujhfTB3). Consider signing up to his [Total TypeScript course](https://totaltypescript.com).
4737

4838
## Reference
4939

50-
### `npm run exercise 01`
51-
52-
Alias: `npm run e 01`
53-
54-
Run the corresponding `*.problem.ts` file.
55-
56-
### `npm run solution 01`
40+
### `npm run exercise`
5741

58-
Alias: `npm run s 01`
42+
Alias: `npm run e`
5943

60-
Run the corresponding `*.solution.ts` file. If there are multiple, it runs only the first one.
44+
Open a prompt for choosing which exercise you'd like to run.

package-lock.json

Lines changed: 82 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Matt Pocock <[email protected]>",
66
"license": "MIT",
77
"devDependencies": {
8-
"@total-typescript/exercise-cli": "^0.3.2",
8+
"@total-typescript/exercise-cli": "^0.4.0",
99
"@types/node": "^18.6.5",
1010
"chokidar": "^3.5.3",
1111
"cross-fetch": "^3.1.5",

0 commit comments

Comments
 (0)