-
Notifications
You must be signed in to change notification settings - Fork 25
/
gulpfile.js
46 lines (36 loc) · 1.2 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
42
43
44
45
46
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
// newer = require('gulp-newer'),
// imagemin = require('gulp-imagemin'),
livereload = require('gulp-livereload');
// var imgSrc = 'assets/images/originals/*';
// var imgDest = 'assets/images';
gulp.task('styles', function(){
return sass('scss/')
.on('error', function (err) {
console.error('Error!', err.message);
})
.pipe(gulp.dest(''))
.pipe(autoprefixer())
.pipe(minifycss())
.pipe(gulp.dest(''))
.pipe(livereload());
});
// gulp.task('images', function() {
// return gulp.src(imgSrc, {base: 'assets/images/originals'})
// .pipe(newer(imgDest))
// .pipe(imagemin({ optimizationLevel: 3, progressive: true, interlaced: true }))
// .pipe(gulp.dest(imgDest));
// });
//gulp.task('default', ['styles', 'images']);
gulp.task('default',['styles']);
gulp.task('watch', function() {
livereload.listen();
// Watch .scss files
gulp.watch('scss/*.scss', ['styles']);
gulp.watch('scss/**/*.scss', ['styles']);
// watch original images directory
//gulp.watch('assets/images/originals/**', ['images']);
});