-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
47 lines (39 loc) · 1.14 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
var gulp = require('gulp');
var sass = require('gulp-sass');
var plumber = require('gulp-plumber');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create();
var src = {
sass: './styles/skin.scss',
fonts: './styles/fonts/*.scss',
images: './images/**/*',
js: './scripts/**/*.scss'
};
var build = {
sass: './build/styles/'
}
function handleError(error) {
console.log(error.toString());
}
gulp.task('sass', function() {
var paths = [];
paths.push("bower_components/");
return gulp.src([src.sass, src.fonts])
.pipe(sass({
includePaths: paths
}))
.on('error', sass.logError)
.pipe(autoprefixer())
.pipe( gulp.dest(build.sass));
});
gulp.task('watch', ['sass'], function () {
gulp.watch('styles/**/*.scss', ['sass'])
})
gulp.task('browser-sync', function() {
browserSync.init({
proxy: "it.local.wikitolearn-test.org"
});
gulp.watch("WikiToLearnSkin.php").on('change', browserSync.reload);
gulp.watch("build/**/*").on('change', browserSync.reload);
gulp.watch("images/**/*").on('change', browserSync.reload);
});