D
D
Dmitry Lokshin2017-12-08 19:29:22
css
Dmitry Lokshin, 2017-12-08 19:29:22

How to make less file not compile to css?

Hello.
How can I make the .less file not compile to css, for example I create a structure like this:

_variables.less
_mixins.less
_reset.less
styles.less

then in the styles.less file I include all the necessary files:
@import '_variables';
@import '_mixins';
@import '_reset';

Then the whole thing is compiled into the css folder and this is what happens there:
_variables.css
_mixins.css
_reset.css
styles.css

but it should be like this: In sass (scss), this was solved by the fact that the file was called with the prefix _, for example, _mixins.css and that’s it, it didn’t appear in the source file, in less I don’t understand how to do this, in I didn't find any documentation either. Thank you very much in advance!
styles.css

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Semenov, 2017-12-08
@Ddmitrich

You need to give only one main file ( styles.less) to the stream. You probably have a mask for the file extension.

Similarly
gulp.task('styles', function () {
    var stream = gulp.src('/dev/sass/style.less')
    ...
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question