var syntax = 'scss', // Syntax: sass or scss;
gulpversion = '4'; // Gulp version: 3 or 4
var gulp = require('gulp'),
gutil = require('gulp-util' ),
sass = require('gulp-sass'),
browserSync = require('browser-sync'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
cleancss = require('gulp-clean-css'),
rename = require('gulp-rename'),
autoprefixer = require('gulp-autoprefixer'),
notify = require('gulp-notify'),
rsync = require('gulp-rsync');
gulp.task('browser-sync', function() {
browserSync({
proxy: "Gerani",
notify: false
});
});
gulp.task('styles', function() {
return gulp.src('catalog/view/theme/Gerani/stylesheet/stylesheet.scss')
.pipe(sass({ outputStyle: 'expanded' }).on("error", notify.onError()))
.pipe(autoprefixer(['last 15 versions']))
.pipe(cleancss( {level: { 1: { specialComments: 0 } } })) // Opt., comment out when debugging
.pipe(gulp.dest('catalog/view/theme/Gerani/stylesheet'))
.pipe(browserSync.stream())
});
gulp.task('reload', function() {
browserSync.reload();
});
if (gulpversion == 4) {
gulp.task('watch', function() {
gulp.watch('catalog/view/theme/Gerani/stylesheet/stylesheet.scss', gulp.parallel('styles'));
gulp.watch('catalog/view/theme/Gerani/template/**/*.twig', gulp.parallel('reload'))
gulp.watch('catalog/view/theme/Gerani/js/**/*.js');
gulp.watch('catalog/view/theme/Gerani/libs/**/*');
});
gulp.task('default', gulp.parallel('styles', 'browser-sync', 'watch' , 'reload'));
}
var syntax = 'scss', // Syntax: sass or scss;
gulpversion = '4'; // Gulp version: 3 or 4
var gulp = require('gulp'),
gutil = require('gulp-util' ),
sass = require('gulp-sass'),
browserSync = require('browser-sync'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
cleancss = require('gulp-clean-css'),
rename = require('gulp-rename'),
autoprefixer = require('gulp-autoprefixer'),
notify = require('gulp-notify'),
rsync = require('gulp-rsync');
gulp.task('browser-sync', function() {
browserSync({
proxy: "Gerani",
notify: false
});
});
gulp.task('styles', function() {
return gulp.src('catalog/view/theme/Gerani/stylesheet/stylesheet.scss')
.pipe(sass({ outputStyle: 'expanded' }).on("error", notify.onError()))
.pipe(autoprefixer(['last 15 versions']))
.pipe(cleancss( {level: { 1: { specialComments: 0 } } })) // Opt., comment out when debugging
.pipe(gulp.dest('catalog/view/theme/Gerani/stylesheet'))
.pipe(browserSync.stream())
});
gulp.task('reload', function() {
browserSync.reload();
});
if (gulpversion == 4) {
gulp.task('watch', function() {
gulp.watch('catalog/view/theme/Gerani/stylesheet/stylesheet.scss', gulp.parallel('styles'));
gulp.watch('catalog/view/theme/Gerani/template/**/*.twig', gulp.parallel('reload'))
gulp.watch('catalog/view/theme/Gerani/js/**/*.js');
gulp.watch('catalog/view/theme/Gerani/libs/**/*');
});
gulp.task('default', gulp.parallel('styles', 'browser-sync', 'watch' , 'reload'));
}