Skip to content

Commit 3d610c2

Browse files
committed
Upgraded to newest CLI setup
1 parent de16614 commit 3d610c2

File tree

3 files changed

+113
-39
lines changed

3 files changed

+113
-39
lines changed

README.md

+13-28
Original file line numberDiff line numberDiff line change
@@ -8,52 +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 modules. Each module is a group of related exercises.
21-
22-
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 (not module) 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 course encourages **active, exploratory learning**. I'll present a problem, and **you'll be asked to try to find a solution**. To attempt a solution, you'll need to:
32-
33-
1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html)
34-
2. Try to find something that looks relevant.
35-
3. Give it a go to see if it solves the problem.
26+
1. Check out [TypeScript's docs](https://www.typescriptlang.org/docs/handbook/intro.html).
27+
1. Try to find something that looks relevant.
28+
1. Give it a go to see if it solves the problem.
3629

3730
You'll know if you've succeeded because the tests will pass.
3831

39-
**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!
40-
41-
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!
4233

4334
## Acknowledgements
4435

4536
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).
4637

4738
## Reference
4839

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

57-
Alias: `npm run s 01`
42+
Alias: `pnpm run e`
5843

59-
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

+82-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+18-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Matt Pocock <[email protected]>",
66
"license": "GPL",
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
"@types/react": "^18.0.27",
1111
"cross-fetch": "^3.1.5",
@@ -102,7 +102,23 @@
102102
"e-34": "tt-cli run 34",
103103
"s-34": "tt-cli run 34 --solution",
104104
"e-29.2": "tt-cli run 29.2",
105-
"s-29.2": "tt-cli run 29.2 --solution"
105+
"s-29.2": "tt-cli run 29.2 --solution",
106+
"e-00": "tt-cli run 00",
107+
"s-00": "tt-cli run 00 --solution",
108+
"e-04.5": "tt-cli run 04.5",
109+
"s-04.5": "tt-cli run 04.5 --solution",
110+
"e-06.5": "tt-cli run 06.5",
111+
"s-06.5": "tt-cli run 06.5 --solution",
112+
"e-11.1": "tt-cli run 11.1",
113+
"s-11.1": "tt-cli run 11.1 --solution",
114+
"e-11.2": "tt-cli run 11.2",
115+
"s-11.2": "tt-cli run 11.2 --solution",
116+
"e-14.5": "tt-cli run 14.5",
117+
"s-14.5": "tt-cli run 14.5 --solution",
118+
"e-14.6": "tt-cli run 14.6",
119+
"s-14.6": "tt-cli run 14.6 --solution",
120+
"e-16.5": "tt-cli run 16.5",
121+
"s-16.5": "tt-cli run 16.5 --solution"
106122
},
107123
"dependencies": {
108124
"ts-toolbelt": "^9.6.0"

0 commit comments

Comments
 (0)