Building an Angular 2 + Typescript application template
Building an Angular 2 + Typescript application template

Building an Angular 2 + Typescript application template

2016, Aug 25    

Last time I showed you a way to create a Typescript application template. Now we can use that as a starting point for an Angular 2 application.

As usual, I have created a GitHub repo with the necessary sources and the list of steps to perform. At the end of the process, we’ll get our friendly web server showing a nice “lorem ipsum” coming from an Angular2 Component .

Also in this case the core of the system is gulpfile.js which exposes a bunch of tasks:

  1. ‘clean’ : as the name may suggest, this task is used to clear the www folder from all the external libraries, the transpiled .js files and sourcemaps
  2. ‘libs’: this will copy the depencencies to a specific folder
  3. ‘build’: this will execute ‘clean’ and ‘libs’ and then transpile the .ts files
  4. ‘default’: will execute ‘build’, fire up the webserver and watch the .ts files for changes

Worth of mention is also the index.html which contains the SystemJs initialization code.

Enjoy!

Did you like this post? Then

Do you need coaching, advising or 1:1 consultations?

🤙 Book me!