Answer the question
In order to leave comments, you need to log in
Why is gallp not working properly?
In general, there is a style tax, it initially takes the main.scss file, compiles it to css, adds prefixes, in general, as usual, I have imported the files reset, setting (my settings), fonts and the index file into the same main.scss file. scss (in it I write styles). So here's the problem: when I prescribe different font sizes to a link or just text in the index.scss file, the changes do not appear, that is, I have spying on all files and browser sync is on, for example, I prescribe text font-size: 20px , save, there are changes, the text changes, then I change the same property to font-size for example 30px, or 15px, it doesn’t matter, gallp sees it, overwrites it like (you can see it in the console), the browser automatically restarts the page as it should be and the font size remained the same .. Then no matter how much I change it remains the same until I delete the property, I will not save and write again. That is, if I remove the font-size property, save the changes (the font becomes default), then I also write font-size 30px and the changes are applied, it turns out that the gallp cannot override the value or what? Please help me, I'll throw off for every task style. PS I use galp 4
gulp.task('style', function () {
return gulp.src(path.src.style) //Выберем наш main.scss
.pipe(plumber({errorHandler: notify.onError("Error: <%= error.message %>")})) // оповещение об ошибках
.pipe(sourcemaps.init()) // добавляем карты
.pipe(sass()) // Скомпилируем
.pipe(autoprefixer()) //Добавим вендорные префиксы
.pipe(cssmin()) // Сожмем
.pipe(sourcemaps.write())
.pipe(gulp.dest(path.build.css)) // И в build
.pipe(reload({stream: true})); //перезапускаем страницу по завершению
});
//Gulp watch
gulp.task('watch', function() {
gulp.watch('src/style/**/*.scss', gulp.series('style'));
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question