Skip to content

Instantly share code, notes, and snippets.

@mstssk
Created December 7, 2012 17:09
Show Gist options
  • Save mstssk/4234745 to your computer and use it in GitHub Desktop.
Save mstssk/4234745 to your computer and use it in GitHub Desktop.
TypeScript on Ubuntu

About

Memo for myself someday.

What's TypeScript ?

http://www.typescriptlang.org/Tutorial/

My environment

  • Thinkpad X201s
  • Ubuntu 12.04.1 LTS

Installation

  1. Install npm

    $ sudo add-apt-repository ppa:chris-lea/node.js
    $ sudo apt-get install npm
    $ sudo npm install -g typescript
    

    nodejs was installed automatically, because npm depends on nodejs. nodejs package is too old on Ubuntu 12.04 repository.

    note: http://y-anz-m.blogspot.jp/2012/11/ubuntu-typescript.html

  2. Syntax highlight TypeScript on Sublime Text 2

    1. Download zipped syntax file for ST2 from following url.

      http://blogs.msdn.com/b/interoperability/archive/2012/10/01/sublime-text-vi-emacs-typescript-enabled.aspx

    2. Open packages directory of ST2.

      Preferences -> Browse Packages... on ST2 window menu.

    3. Unzip and copy to packages directory of ST2.

      Packages --- other plugins dirs
               |-- ...
               `-- TypeScript
                   `-- typescript.tmLanguage
      
    4. Command Set syntax

      Press Ctrl + Shift + p then Set syntax: TypeScript

    note: http://y-anz-m.blogspot.jp/2012/11/sublime-text-2-typescript-syntax.html

  3. Code completion on ST2

    Stub

    $ npm install -p tsc_completion
    $ cp SublimeTextTypeScriptCompletionPlugin ~/.config/sublime-text-2/Packages/
    

    note: http://y-anz-m.blogspot.jp/2012/11/sublime-text-2-typescript_29.html

  4. Build .ts files on ST2

    Stub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment