Skip to content

Commit

Permalink
Add info to README
Browse files Browse the repository at this point in the history
  • Loading branch information
torokmark committed Oct 22, 2016
1 parent 996f569 commit 01ee72f
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,27 @@ $ cd design_patterns_in_typescript
$ tsc
```

There is a new `tsconfig.json` file in the root directory which is responsible for the compiler options.
There is a `tsconfig.json` file in the root directory which is responsible for the compiler options.

As it is set the default target is Ecmascript5 now.

Any additional options come here.

By default the output is a `patterns.js` file.


To compile only one pattern, use the following command.

```
$ cd design_patterns_in_typescript/visitor
$ tsc --target ES5 visitor.ts
$ tsc --target ES5 --module system --outFile visitor.js visitor.ts
```

## Execute the project

After the compilation of the project, a `patterns.js` is generated by default.
Executing the file is:

```
node patterns.js
```
> Here if there is no `--outFile` option then the compiler generates the js counterpart into the current directory.

0 comments on commit 01ee72f

Please sign in to comment.