V
V
Vladislav2015-06-23 11:57:49
gulp.js
Vladislav, 2015-06-23 11:57:49

Why is gulp not processing an edited (open) file?

There is a topic_less task that compiles less files. There is one main.js file in it imports, when the task is started, one main.css is collected. There is also a topic_less_watch task that watches for changes in less files and starts topic_less. Locally everything works, but now I decided to transfer everything to a working server. I transfer, run topic_less_watch, start editing the file, save it, gulp sees the changes and runs the topic_less task. All less files are processed except the one I am currently editing. What could be the problem?

gulp.task('topic_less', function () {
  var fileName = 'topic_thesaurus_new';

  var lessSources = [
    '../sources/less/main.less'
  ];

  return result = gulp.src(lessSources)
  .pipe(concat(fileName + '.less'))
  .pipe(less())
  .pipe(base64())
  .pipe(minifyCss())
  .pipe(gzip())
  .pipe(gulp.dest('../_css'));
});

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

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