Skip to content

Commit b25ee8e

Browse files
committed
Upgraded to latest CLI
1 parent d2c8c6e commit b25ee8e

File tree

3 files changed

+95
-39
lines changed

3 files changed

+95
-39
lines changed

README.md

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,41 @@ Take the course on [Total TypeScript](https://totaltypescript.com/tutorials/begi
99
- Text explanations
1010
- A built-in Stackblitz editor
1111

12-
## Installation Instructions
13-
14-
Clone this repo or [open in Gitpod](https://gitpod.io/#https://github.com/total-typescript/beginners-typescript).
15-
1612
```sh
1713
# Installs all dependencies
1814
npm install
1915

20-
# Starts the first exercise
21-
npm run exercise 01
22-
23-
# Runs linting and tests on the solution
24-
npm run solution 01
16+
# Asks you which exercise you'd like to run, and runs it
17+
npm run exercise
2518
```
2619

2720
## How to take the course
2821

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

3124
To take an exercise:
3225

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

3829
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:
3930

40-
1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html)
41-
2. Try to find something that looks relevant.
42-
3. Give it a go to see if it solves the problem.
31+
1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html).
32+
1. Try to find something that looks relevant.
33+
1. Give it a go to see if it solves the problem.
4334

4435
You'll know if you've succeeded because the tests will pass.
4536

46-
**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!
47-
48-
You can run `npm run solution 01` to run the tests and typechecking on the solution.
37+
**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!
4938

5039
## Acknowledgements
5140

5241
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).
5342

5443
## Reference
5544

56-
### `npm run exercise 01`
57-
58-
Alias: `npm run e 01`
59-
60-
Run the corresponding `*.problem.ts` file.
61-
62-
### `npm run solution 01`
45+
### `npm run exercise`
6346

64-
Alias: `npm run s 01`
47+
Alias: `npm run e`
6548

66-
Run the corresponding `*.solution.ts` file. If there are multiple, it runs only the first one.
49+
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 <mattpocockvoice@gmail.com>",
66
"license": "GPL-3.0",
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
"cross-fetch": "^3.1.5",
1111
"jsdom": "^21.1.1",

0 commit comments

Comments
 (0)