angular2-gulp-typescript
angular2-gulp-typescript copied to clipboard
Hello world for Angular 2, Gulp and TS
Simple Angular 2 app written in TypeScript with Gulp Automation
Install Gulp
$ npm install -g gulp # Or sudo npm install -g gulp
Compile your source and libs and move to dist
$ cd angular2-gulp-typescript
$ gulp
Using gulpfile ....angular2-gulp-typescript/gulpfile.js
Starting 'js'...
Starting 'libs'...
Starting 'html'...
Finished 'html' after 1.11 s
Finished 'js' after 1.13 s
Finished 'libs' after 1.12 s
Starting 'default'...
Finished 'default' after 14 μs
Edit your app (src folder)
We have good experience using these Typescript aware editors:
- Visual Studio Code
- Webstorm 10
- Atom with TypeScript plugin
- Sublime Text with Typescript-Sublime-Plugin
Load the app
From the directory that contains index.html:
$ npm install -g http-server # Or sudo npm install -g http-server
$ cd dist
$ http-server # Creates a server at localhost:8080
# In a browser, visit localhost:8080/index.html
Clean dist
$ cd angular2-gulp-typescript
$ gulp clean