0
0

Здравствуйте. При запуске gulp у меня выдает ошибку:

[15:25:22] Starting 'styles'...
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


1 │ @import 'base/variables';
│ ^^^^^^^^^^^^^^^^

- 1:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


9 │ @import 'blocks/promo';
│ ^^^^^^^^^^^^^^

- 9:9 root stylesheet

Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import


10 │ @import 'blocks/header';
│ ^^^^^^^^^^^^^^^

- 10:9 root stylesheet

[Browsersync] 1 file changed (style.min.css)
[15:25:22] Finished 'styles' after 72 ms

Сам gulpfile:

const gulp        = require('gulp');
const browserSync = require('browser-sync');
const sass        = require('gulp-sass')(require('sass'));
const cleanCSS = require('gulp-clean-css');
const autoprefixer = require('gulp-autoprefixer').default;
const rename = require("gulp-rename");

gulp.task('server', function() {

    browserSync({
        server: {
            baseDir: "src"
        }
    });

    gulp.watch("src/*.html").on('change', browserSync.reload);
});

gulp.task('styles', function() {
    return gulp.src("src/sass/**/*.+(scss|sass)")
        .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
        .pipe(rename({suffix: '.min', prefix: ''}))
        .pipe(autoprefixer())
        .pipe(cleanCSS({compatibility: 'ie8'}))
        .pipe(gulp.dest("src/css"))
        .pipe(browserSync.stream());
});

gulp.task('watch', function() {
    gulp.watch("src/sass/**/*.+(scss|sass)", gulp.parallel('styles'));
})

gulp.task('default', gulp.parallel('watch', 'server', 'styles'));

Скриншоты по ссылке - style.scss и дерево проекта - https://disk.yandex.ru/d/CG-FWjZG7b0sBA.

Такую ошибку выдавало с самого начала. Я скопировала код из проверочного домашнего задания, который должен быть верный, ничего не поменялось. Что не так?


student_Z1H9xc1Z
1 week ago






Еще нет ответов