A
A
Araya2018-12-09 23:30:52
css
Araya, 2018-12-09 23:30:52

Why doesn't code compile less to CSS?

Good evening friends. The trouble is, galp does not convert less to CSS, there were no problems at all with SASS. In the console it says that everything is ok, but the file remains clean
5c0d7b6976854155514274.png

var less = require('gulp-less'),
path = require('path');

gulp.task('less', function () {
    return gulp.src('./less/**/*.less')
      .pipe(less({
        paths: [ path.join(__dirname, 'less', 'includes') ]
      }))
      .pipe(gulp.dest('./app/css'));
  });

  gulp.task('watch',  function() {
    gulp.watch('app/less/**/*.less', ['less']);
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Romanov, 2018-12-10
@andrew-r

Perhaps the problem is in the paths parameter, you calculate it based on __dirname, and this is the path to the current file, that is, to the file with the gallp task, and not with the sources.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question