Answer the question
In order to leave comments, you need to log in
The problem with gulp is more precisely with @import. How to decide?
Good evening. My problem is that every 5 minutes I get an error that something is wrong, for example, @import 'сlients'
I don’t write anything in detail, I don’t know how to deal with the problem. And he always hysteria on the last import. I found a way out that I just resaved this file, but it's still not an option. I would like to solve this problem. Here is the skirin:
Code with galp.js
var gulp = require('gulp');
var browserSync = require('browser-sync');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var concatCSS = require('gulp-concat-css');
var ftp = require('gulp-ftp');
// Static Server + watching scss/html files
gulp.task('watch', ['sass'], function() {
browserSync.init({
server: "src/"
});
// Следим за измениями файлами
gulp.watch("src/sass/*.sass", ['sass']);
gulp.watch("src/*.html").on('change', browserSync.reload);
});
// компилируем Sass в Css и обновляем страницу
gulp.task('sass', function() {
return gulp.src("src/sass/*.sass")
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(concatCSS("style.css"))
.pipe(gulp.dest("src/css"))
.pipe(browserSync.stream());
});
gulp.task('ftp', function () {
return gulp.src('src/**')
.pipe(ftp({
host: 'заполнено у меня в файле',
user: 'заполнено у меня в файле',
pass: 'заполнено у меня в файле',
remotePath: 'заполнено у меня в файле' }))
.pipe(gutil.noop());
});
gulp.task('default', ['serve']);
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