-
Notifications
You must be signed in to change notification settings - Fork 69
/
Gulpfile.js
39 lines (33 loc) · 1022 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
var gulp = require('gulp'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch');
gulp.task('sass', function () {
return gulp.src('./src/sass/clockpicker.scss')
.pipe(sourcemaps.init())
.pipe(sass({
includePaths: [
'./bower_components/'
],
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(concat('materialize.clockpicker.css'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./dist/css'));
});
gulp.task('js', function () {
return gulp.src('./src/js/materialize.clockpicker.js')
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(gulp.dest('./dist/js'))
});
gulp.task('watch', function () {
watch('src/**/*.js', function () {
gulp.start('js');
});
watch('src/**/*.scss', function () {
gulp.start('sass');
})
});