TS2 contains code samples and configuration to run a Typescript project.
The intention is to keep this repository up-to-date with the latest version of Typescript available.
- Design patterns
The project has a build pipeline setup to compile Typescript 2+ through ES6 and, finally, to ES5.
I did not consider a browser integration useful here because this project must provide useful code snippets which you can copy-and-paste into another project.
The files are bundled using Gulp, compiled to ES6 using gulp-typescript and then to ES5 with gulp-babel.
gulp-typescript is a Gulp wrapper over the Typescript compiler. See TS compiler options for information on how to configure.
gulp-babel is a Gulp wrapper over Babel. See Babel API for information on how to configure.
Source maps are generated using gulp-sourcemaps.
Tslint
- https://github.com/panuhorsmalahti/gulp-tslint
- https://palantir.github.io/tslint/
- https://palantir.github.io/tslint/rules/
Some things which are used in configuration and you might want to be aware of:
- merge2 package used to merge the Typescript project streams
- Information from TS on Gulp integration
- Breaking changes on [gulp-typescript v3]http://dev.ivogabe.com/gulp-typescript-3/