Typescript is a free and open source programming language developed by Microsoft. It is a superset of JavaScript and essentially adds an optional static type and class-oriented object-oriented programming to the language, and its official website is http://www.typescriptlang.org/.
Why to learn this language, now HTML5 strong momentum of development, as a developer at any time to focus on new things become the necessary skills. In the hand Tour development engine has COCOS2D-JS and Egret engine (Egret) These two more mature game engine. For Cocos2d-js here do not do too much introduction, for Egret, oneself more curious so learn a bit. And the language that develops Egret engine uses is typescript, so from now on we study typescript together. This is the first article that describes how to install the Configuration typescript Development environment (MAC environment).
Configuration steps:
First step:
Configuration typescript is simpler, where you first configure homebrew (Mac Suite manager). The website is: http://brew.sh/. Open this page to choose the language for Simplified Chinese, and then the page becomes the Chinese page.
In the terminal, enter the command for the prompt in the page:
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then click Enter to start loading the homebrew and follow the prompts to enter the secret during the midway process.
Step Two:
Install node, there are two ways to install.
1, command line mode using homebrew, the command is as follows:
Brew Install node
Click Enter to wait for node and NPM installation.
2, or directly to node website download the corresponding node installation files, recommended this way, relatively fast and convenient.
After the installation is complete, verify that the installation was successful with the following command:
Node-v View the version number of node
Npm-v View the version number of NPM
Step Three:
Install typescript, enter command at Terminal:
NPM install-g typescript
Click Enter to wait for the installation to complete
To compile the TS File command for typescript:
TSC Helloworld.ts
OK, here typescript installation is complete. Development Typescript recommended to use Webstorm, if the environment is configured Webstorm will automatically add typescript compilation environment to the software, very convenient and quick.