diff --git a/README.md b/README.md index ac3bff6..52b212d 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,10 @@ 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. @@ -39,10 +43,16 @@ Just add a `.js.ts` file in your `app/assets/javascripts` directory and include 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`:
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: