-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
41 lines (33 loc) · 955 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
37
38
39
40
41
var gulp = require('gulp');
var typescript = require('gulp-typescript');
var browserSync = require('browser-sync');
var less = require('gulp-less');
gulp.task('ts', function () {
return gulp.src(['./src/**/*.ts', 'typings/**/*.d.ts'])
.pipe(typescript({
out: 'charting.js'
}))
.pipe(gulp.dest('./dist'));
});
gulp.task('less', function () {
return gulp.src('./src/**/*.less')
.pipe(less({
}))
.pipe(gulp.dest('./dist'));
});
gulp.task('watch-less', function () {
gulp.watch(['./src/**/*.less'], ['less']);
});
gulp.task('watch-ts', function () {
gulp.watch(['./src/**/*.ts'], ['ts']);
});
gulp.task('browserSync', function () {
browserSync.init({
server: './',
index: './test/index.html',
port: 3030,
files: ['./dist/*.*', './test/index.html']
});
});
gulp.task('watch', ['watch-ts', 'watch-less', 'browserSync'], function () {
});