Skip to content

Instantly share code, notes, and snippets.

@sammdec
Created February 6, 2014 11:19
Show Gist options
  • Save sammdec/8842339 to your computer and use it in GitHub Desktop.
Save sammdec/8842339 to your computer and use it in GitHub Desktop.
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
imagemin = require('gulp-imagemin');
var paths = {
css: 'css/style.css',
img: 'img/**/*''
};
gulp.task('css', function () {
gulp.src(paths.css)
.pipe(sass({outputStyle: "compressed"}))
.pipe(gulp.dest('/'));
});
gulp.task('img', function() {
gulp.src(paths.img)
.pipe(imagemin())
.pipe(gulp.dest('img/'))
});
gulp.task('watch', function () {
gulp.watch(paths.css, ['css']);
gulp.watch(path.img, ['img']);
});
gulp.task('default', ['css', 'img', 'watch']);
@mikefrancis
Copy link

Just looking at this now and thought I'd let you know - duplicate apostrophe on line 8

@mikefrancis
Copy link

Also Line 25 should be gulp.watch(paths.img, ['img']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment