-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (33 loc) · 935 Bytes
/
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
/*
* GULP: really-simple
* Author: Flaubert Henriques
* REQUIRED: Node version <= v12.22.12
* REQUIRED: NPM version <= v6.14.16
* License: GPLv3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/
const gulp = require('gulp');
const sass = require('gulp-sass');
const browserSync = require('browser-sync').create();
function compilaSass() {
return gulp
.src('sass/**/*.scss')
.pipe(sass({
outputStyle: 'expanded'
}))
.pipe(gulp.dest('./'))
.pipe(browserSync.stream());
}
function browser() {
browserSync.init({
proxy: "localhost"
});
}
function watch() {
gulp.watch('sass/**/*.scss', compilaSass);
gulp.watch(['*.html', './**/*.html', '*.php', './**/*.php']).on('change', browserSync.reload);
}
exports.compilaSass = compilaSass;
exports.browser = browser;
exports.watch = watch;
exports.default = gulp.parallel(browser, watch, compilaSass);