-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
52 lines (45 loc) · 1.34 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
47
48
49
50
51
52
// Include gulp
var gulp = require('gulp');
module.exports = gulp;
// Include Our Plugins
var jshint = require('gulp-jshint');
var compass = require('gulp-compass');
var concat = require('gulp-concat');
// var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var browserSync = require('browser-sync');
var filter = require('gulp-filter');
var uglify = require('gulp-uglifyjs');
var minifyCSS = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var plumber = require('gulp-plumber');
var onError = function (err) {
console.log(err);
};
// Compile Our Sass/Compass
gulp.task('sass', function() {
return gulp.src('css/*.scss')
.pipe(plumber({
errorHandler: onError
}))
.pipe(compass({
config_file: './config.rb',
css: 'css',
sass: 'css'
}))
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'ff 17', 'opera 12.1', 'ios 6', 'android 4'))
.pipe(gulp.dest('./css/'));
});
// Browsersync
gulp.task('browser-sync', function() {
browserSync({
proxy: "localhost/",
files: ["style.css", "js/*.js", "*.php", "*.html"]
});
});
// Watch Files For Changes
gulp.task('watch', function() {
gulp.watch('css/*.scss', ['sass']);
});
// Default Task
gulp.task('default', ['sass', 'watch']);