Posts

Showing posts from September, 2016

EcmaScript6 with TypeScript and Grunt.js

Image
ECMAScript 6 is nearly here . In fact I can already taste it and so will you with TypeScript . TypeScript is an open source language and compiler written by Microsoft running on NodeJS. The language is based on the evolving ES6 spec but adds support for types, interfaces that generates JavaScript (ES3 or ES5 dialects based on flag). In fact it's very interesting shift for Microsoft to make something useful for open source community, so before you boo me, have a look at it as it's not so bad. Introduction Microsoft has compiled a great video introducing the TypeScript and since one video replaces million words, let's start with it. Using TypeScript As TypeScript is built on top of Node.js, installing it will be as easy as breathing. npm install -g typescript And compiling the files is done through the tsc command, however this is no way respectable developers work. We'll be using Grunt.js to compile our TypeScript files during the build phase. Let&#