Skip to content

Commit 56ff7aa

Browse files
authored
Merge pull request #49 from Walid-Shouman/Walid-Shouman-patch-1
Update README.md
2 parents 9780d13 + 4c6dd51 commit 56ff7aa

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,27 @@ And then execute:
3232

3333
$ bundle
3434

35+
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).
36+
37+
npm install --save-dev @types/node
38+
3539
## Usage
3640

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

3943
Configurations:
4044

4145
```
42-
# Its defaults are `--target ES5 --noImplicitAny`.
43-
Typescript::Rails::Compiler.default_options = [ ... ]
46+
Typescript::Rails::Compiler.default_options = %w(--target ES5 --noImplicitAny --module commonjs)
4447
```
4548

49+
Default Configurations:
50+
51+
```
52+
Typescript::Rails::Compiler.default_options = %w(--target ES5 --noImplicitAny)
53+
```
54+
55+
4656
## Default Javascript Compilation
4757

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

0 commit comments

Comments
 (0)