Skip to content

Commit 520bc53

Browse files
committed
Updated TT CLI
1 parent 0c4a095 commit 520bc53

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

readme.md

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,50 +8,37 @@ Clone this repo or [open in Gitpod](https://gitpod.io/#https://github.com/total-
88
# Installs all dependencies
99
npm install
1010

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

1815
## How to take the course
1916

20-
You'll notice that the course 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`.
2118

2219
To take an exercise:
2320

24-
1. Go into `*.problem.ts`
25-
2. Run `npm run exercise 01`, where `01` is the number of the exercise you're on.
26-
27-
The `exercise` script will run TypeScript typechecks and a test suite on the exercise.
21+
1. Run `npm run exercise`
22+
2. Choose which exercise you'd like to run.
2823

2924
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-
1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html) or the [React TypeScript cheatsheet](https://react-typescript-cheatsheet.netlify.app/)
26+
1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html).
3227
1. Try to find something that looks relevant.
3328
1. Give it a go to see if it solves the problem.
3429

3530
You'll know if you've succeeded because the tests will pass.
3631

37-
**If you succeed**, or **if you get stuck**, unpause the video and check out the `*.solution.ts`. You can see if your solution is better or worse than mine!
38-
39-
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!
4033

4134
## Acknowledgements
4235

4336
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).
4437

4538
## Reference
4639

47-
### `npm run exercise 01`
48-
49-
Alias: `npm run e 01`
50-
51-
Run the corresponding `*.problem.ts` file.
52-
53-
### `npm run solution 01`
40+
### `npm run exercise`
5441

55-
Alias: `npm run s 01`
42+
Alias: `npm run e`
5643

57-
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.

0 commit comments

Comments
 (0)