-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
36 lines (30 loc) · 839 Bytes
/
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
var gulp = require("gulp");
var sass = require('gulp-sass');
var del = require('del');
var watch = require('gulp-watch');
var ts = require("gulp-typescript");
var tsProject = ts.createProject("tsconfig.json");
gulp.task("clean", function(){
return del(["build"]);
});
gulp.task("compile", function () {
return tsProject.src()
.pipe(tsProject())
.js.pipe(gulp.dest("build"));
});
gulp.task("copy:assets", function(){
return gulp.src("src/assets/**/*", "!.*").pipe(gulp.dest("build"))
});
gulp.task('watch:assets', function() {
return gulp.src('sass/*.scss')
.pipe(watch('sass/*.scss'))
.pipe(sass())
.pipe(gulp.dest('build'));
});
gulp.task('tslint', () => {
return gulp.src("src/**/*.ts")
.pipe(tslint({
formatter: 'prose'
}))
.pipe(tslint.report());
});