The project uses gulp. The gulpfile.js is configured to automatically reload using browsersync.

I am trying to connect and configure the panini template engine in the gulpfile.js file like this:

gulp.task('compile-html', function() { gulp.src('html/pages/**/*.html') .pipe(panini({ root: 'html/pages/', layouts: 'html/layouts/', partials: 'html/partials/', helpers: 'html/helpers/', data: 'html/data/' })) .pipe(gulp.dest('app')) .on('finish', browserSync.reload); }); gulp.task('compile-html:reset', function(done) { panini.refresh(); done(); }); 

Here is the whole code

When you call watch page index.html not compiled. In what m. mistake?

  • There may be an extra character ; in the line data: 'html;/data/' - greybutton
  • This is a typo, but the reason is not in it. updated the question - Marina Voronova
  • one
    Perhaps the problem is in the ways. It should be rechecked. Also, perhaps, due to this: "Note that Panini loads layouts, partials, helpers, and data files once on first run. Whenever these files change, call panini.refresh() to get it up to date." - try to call refresh on gulp.watch - lexxl
  • thanks, the error was in the wrong way - Marina Voronova

0