/*jslint node: true, indent: 2 */
'use strict';


var gulp  = require('gulp'),
    shell = require('gulp-shell'),
    del   = require('del'),
    files;

files = {
  src: 'src',
  build: 'build'
};

gulp.task('clean', function(cb) {
  del(['build'], cb);
});

gulp.task('build', ['clean'], function() {
  return gulp.src(files.src + '/*.ts', {read: false})
    .pipe(shell([
      './node_modules/typescript/bin/tsc -t ES5 -m commonjs <%= file.path %> --outDir <%= out %>'
    ], {
      templateData: {
        out: files.build
      }
    }));
});

gulp.task('default', ['clean', 'build']);



// vim: set ts=2 sw=2 sts=2 et :

@@ -143,20 +143,57 @@
     
-files;%0A%0Afile
+karma = require('karma').server,%0A    paths;%0A%0Apath
 s = 
@@ -205,16 +205,21 @@
 rc: 'src
+/*.ts
 ',%0A  bui
@@ -360,27 +360,17 @@
 src(
-file
+path
 s.src
- + '/*.ts'
 , %7Br
@@ -542,20 +542,20 @@
    out: 
-file
+path
 s.build%0A
@@ -591,34 +591,322 @@
 sk('
-default', %5B'clean', 'build
+watch', function() %7B%0A  gulp.watch(paths.src, %5B'build'%5D);%0A%7D);%0A%0A%0A// Warning, karma is a rolling task%0A// Secondly, there is a potential of many cache invalidations%0Agulp.task('karma', %5B'build'%5D, function() %7B%0A  karma.start(%7B%0A    configFile: __dirname + '/karma.conf.js',%0A  %7D);%0A%7D);%0A%0Agulp.task('default', %5B'watch', 'karma
 '%5D);

Add working gulpfile