-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
53 lines (47 loc) · 1.45 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
53
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var browserSync = require('browser-sync').create(),
reload = browserSync.reload;
var $ = require('gulp-load-plugins')({
pattern: '*'
});
gulp.task('sass', function () {
return gulp.src('assets/scss/estilos.scss')
.pipe(sass({
errLogToConsole: true,
sourceComments: 'map',
sourceMap: 'sass',
outputStyle: 'expanded'
})
.on('error', $.sass.logError))
.pipe(gulp.dest('assets/css'))
.pipe(browserSync.reload({
stream: true
}));
});
gulp.task('browser-sync', function () {
browserSync.init(null, {
server: {
baseDir: './'
},
//tunnel: true,
//proxy: 'http://localhost:8010',
port: 3000,
ghostMode: true,
open: false
});
});
gulp.task('html', function () {
console.log('Editou html');
return gulp.src('./*.html')
.pipe(browserSync.reload({
stream: true
}));
});
gulp.task('watch', ['browser-sync'], function () {
console.log('\n########################\n\nhttp://localhost:3000/JornalPucSp-theme/html-modelos/index.html\n\n########################')
gulp.watch(['assets/scss/**/**/*.scss'], ['sass'],[reload]);
gulp.watch(['assets/bootstrap/scss/**/*.scss'], ['sass-bootstrap'],[reload]);
gulp.watch(['*.html'], ['html'],[reload]);
});