Thanks to visit codestin.com
Credit goes to github.com

Skip to content

a-suenami/typescript-rails

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript for Rails

This is a wrapper for the TypeScript JavaScript superset language by Microsoft.

It enables you to use the .ts extension in the Asset Pipeline and also in ActionView Templates.

This gem uses the typescript-node-ruby library by KAWACHI Takashi for the typescript parsing with node js.

The credit for the overall structure and the tests goes to the people that wrote the coffee-rails Gem, since I shamelessly copy&pasted some of their code.

Requirements

The current version requires that node.js is installed on the system.

The requirement for node is tested upon starting the application. If the node command is not available you get the following error message:

typescript-node requires node command, but it's not found. Please install it. Set TS_NODE environmental variable If you want to use node command in non-standard path.

Installation

Add this line to your application's Gemfile:

gem "typescript-rails", '>= 0.1.3', git: "[email protected]:funnythingz/typescript-rails.git"

And then execute:

% bundle

manual install

% gem install specific_install
% gem specific_install
% gem specific_install -l "[email protected]:funnythingz/typescript-rails.git"

Usage

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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

An asset pipeline wrapper for the typescript language

Resources

License

Stars

Watchers

Forks

Packages

No packages published