T
T
toha_man2019-05-03 12:05:26
Pug
toha_man, 2019-05-03 12:05:26

How to track errors in gulp-pug?

Pug in my gallp file is used in the simplest way. The project consists of several templates, includes, mixins, which are then assembled into large html files. At the development stage, there are errors that pug displays as the line number of common large files without any additional information.
How to actually configure gulp-pug to see more error information?
gulpfile.js:

gulp.src(PATH_CONFIG.pug.src)
      .pipe(plumber(function (error) {
         gutil.log(error.message);
         this.emit('end');
      }))
      .pipe(pug({
         pretty: true,
      }))
      .pipe(gulp.dest(PATH_CONFIG.pug.dest))
      .pipe(browserSync.reload({ stream: true }));
      cb();

pug error output:
[12:04:01] Starting 'pug'...
[12:04:01] Finished 'pug' after 1.84 ms
[12:04:01] Starting 'browserify'...
[12:04 :01] Unexpected token (631:12) - error in pag task

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur Petrin, 2019-05-03
@NeYmExa

Try looking here about gulp-pug errors: https://habr.com/en/post/259225/
Helped me)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question