-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
30 lines (25 loc) · 889 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
const gulp = require('gulp'),
path = require('path'),
ts = require('gulp-typescript'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
tsProject = ts.createProject('tsconfig.json');
const srcDir = 'src',
distDir = 'dist';
gulp.task('compile-ts', function() {
return tsProject.src()
.pipe(ts(tsProject)).js
.pipe(gulp.dest(distDir));
});
gulp.task('compile-scss', function() {
return sass(srcDir+'/scss/mui.daterangepicker.scss')
.pipe(autoprefixer('iOS 8','Android 4.3'))
.pipe(gulp.dest(distDir))
});
gulp.task('watch-ts', function() {
gulp.watch([`${srcDir}/*.ts`, `!${srcDir}/*.d.ts`], ['compile-ts']);
});
gulp.task('default', function(){
gulp.watch([`${srcDir}/ts/*.ts`, `!${srcDir}/ts/*.d.ts`], ['compile-ts']);
gulp.watch([`${srcDir}/scss/*.scss`], ['compile-scss']);
})