Skip to content

Commit

Permalink
Merge pull request #49 from Walid-Shouman/Walid-Shouman-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
bdrazhzhov committed Nov 13, 2016
2 parents 9780d13 + 4c6dd51 commit 56ff7aa
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,27 @@ And then execute:

$ bundle

Note: We need to install (if we haven't already) the Typescript definitions, [more info](https://github.com/DefinitelyTyped/DefinitelyTyped#how-do-i-get-them).

npm install --save-dev @types/node

## Usage

Just add a `.js.ts` file in your `app/assets/javascripts` directory and include it just like you are used to do.

Configurations:

```
# Its defaults are `--target ES5 --noImplicitAny`.
Typescript::Rails::Compiler.default_options = [ ... ]
Typescript::Rails::Compiler.default_options = %w(--target ES5 --noImplicitAny --module commonjs)
```

Default Configurations:

```
Typescript::Rails::Compiler.default_options = %w(--target ES5 --noImplicitAny)
```


## Default Javascript Compilation

Add this line to your `config/application.rb` as show below, above the `config.assets.enabled = true`:
Expand Down

0 comments on commit 56ff7aa

Please sign in to comment.