Skip to content

Commit 84f43f3

Browse files
committed
Add 2.0 related info to README
1 parent f35e26c commit 84f43f3

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,24 @@ Here are the implementations of the following design patterns in TypeScript:
3434
* [State](https://github.com/torokmark/design_patterns_in_typescript/tree/master/state)
3535
* [Strategy](https://github.com/torokmark/design_patterns_in_typescript/tree/master/strategy)
3636
* [Template Method](https://github.com/torokmark/design_patterns_in_typescript/tree/master/template_method)
37-
* [Visitor](https://github.com/torokmark/design_patterns_in_typescript/tree/master/visitor)
37+
* [Visitor](https://github.com/torokmark/design_patterns_in_typescript/tree/master/visitor)
38+
39+
## Compile the project
40+
41+
```
42+
$ git clone https://github.com/torokmark/design_patterns_in_typescript.git
43+
$ cd design_patterns_in_typescript
44+
$ tsc
45+
```
46+
47+
There is a new `tsconfig.json` file in the root direcotry which is responsible for the compiler options.
48+
As it is set the default target is Ecmascript5 now.
49+
Any additional options come here.
50+
51+
To compile only one pattern, use the following command.
52+
53+
```
54+
$ cd design_patterns_in_typescript/visitor
55+
$ tsc --target ES5 visitor.ts
56+
```
57+
>> Here if there is no `--outFile` option then the compiler generates the js counterpart into the current directory.

0 commit comments

Comments
 (0)