import {Gulpclass, Task, SequenceTask} from 'gulpclass/Decorators';
import * as gulp from 'gulp';
import * as tslint from 'gulp-tslint';
import * as ts from 'gulp-typescript';
import * as del from 'del';
import * as debug from 'gulp-debug';

@Gulpclass()
export class 
 {

	config:any;
	tsProject:ts.Project;

	constructor() {
		this.tsProject = ts.createProject('./tsconfig.json');
	}

	@Task()
	clean(cb:Function) {
		return del(['./dist/**'], cb);
	}

	@Task('ts::lint')
	tslint() {
		gulp.src(['./app/**/*.ts'])
			.pipe(tslint())
			.pipe(tslint.report('verbose'))
			.pipe(debug());
	}

	@Task('ts::compile')
	src() {
		let tsResult = this.tsProject.src()
			.pipe(ts(this.tsProject));
		return tsResult.js
			.pipe(gulp.dest('./dist'))
			.pipe(debug());
	}

	@SequenceTask()
	build() {
		return ["ts::compile"];
	}
	
	@Task()
	default() {
		return ["build"];
	}
}

Gulpfile