forked from Urigo/angular2-meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (36 loc) · 1.02 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var gulp = require("gulp");
var clean = require("gulp-clean");
var runSequence = require("run-sequence");
var gulpTypings = require("gulp-typings");
var exec = require('child_process').exec;
var git = require("gulp-git");
var fs = require("fs");
// Install typings.
gulp.task("typings",function(){
return gulp.src("./typings.json")
.pipe(gulpTypings());
});
// Build TypeScript.
gulp.task("tsbuild", function(callback) {
exec("tsc", function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
callback();
});
});
gulp.task("lint", function() {
var tslint = require("gulp-tslint");
return gulp.src(["modules/*.ts"])
.pipe(tslint({
tslint: require("tslint").default,
configuration: require("./tslint.json")
}))
.pipe(tslint.report("prose", {emitError: true}));
});
gulp.task("git-add", function(){
return gulp.src("build/*")
.pipe(git.add());
});
gulp.task("build", function(callback) {
runSequence("typings", "lint", "tsbuild", "git-add", callback);
});