This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
browserSync = require('browser-sync'); | |
gulp.task('sass', function(){ // Создаем таск "sass" | |
return gulp.src('app/sass/**/*.sass') // Берем источник | |
.pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass | |
.pipe(gulp.dest('app/css')) // Выгружаем результата в папку app/css | |
.pipe(browserSync.reload({stream: true})) // Обновляем CSS на странице при изменении | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task('watch', ['browser-sync', 'sass'], function() { | |
gulp.watch('app/sass/**/*.sass', ['sass']); // Наблюдение за sass файлами | |
gulp.watch('app/*.html', browserSync.reload); | |
gulp.watch('app/js/**/*.js', browserSync.reload); | |
// Наблюдение за другими типами файлов | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ulp.task('sass', function(){ // Создаем таск "sass" | |
return gulp.src('app/sass/**/*.sass') // Берем источник | |
.pipe(sass()) // Преобразуем Sass в CSS посредством gulp-sass | |
.pipe(gulp.dest('app/css')) // Выгружаем результата в папку app/css | |
.pipe(browserSync.reload({stream: true})) // Обновляем CSS на странице при изменении | |
}); |
NewerOlder