Y
Y
Yuri Kalnin2018-07-09 08:29:34
JavaScript
Yuri Kalnin, 2018-07-09 08:29:34

Gulp does not compile less files connected via @import, how to fix?

I connect additional files through @import("filename")in the brick.less file.
Like this:

@import "../blocks/simple.less";

@import "../blocks/header.less";
@import "../blocks/slider.less";
@import "../blocks/offer.less";

@import "../blocks/block-grid-menu-4x4.less";
@import "../blocks/block-share.less";
@import "../blocks/block-smit-numbers.less";
@import "../blocks/block-two-line-carts.less";
@import "../blocks/block-only-smit.less";
@import "../blocks/block-two-big-column.less";
@import "../blocks/block-brands-products.less";
@import "../blocks/block-video-help.less";
@import "../blocks/block-swiper-carts.less";
@import "../blocks/block-line-services.less";

@import "../blocks/block-products.less";
@import "../blocks/product_cart_modal.less";

@import "../blocks/recall.less";
@import "../blocks/footer.less";
@import "../blocks/product_cart_modal.less";

@import "../blocks/device.less";

watching files
gulp.task('brick:watch', function(){

        watch("./src/less/blocks/**/*.less", function(event, cb) {
            gulp.start(['less']);
        });

    });

I monitor the change of all less files in the ./src/less/blocks folder and if the files change, the less task command is executed, the problem is that the first change is reflected, but the next ones are not.
the file changes, watch works, the less task is launched and the css file is generated, but there are no changes.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question