W
W
winde_alps2018-05-08 12:14:57
JavaScript
winde_alps, 2018-05-08 12:14:57

Why doesn't include files work in gulp-file-include module?

Good afternoon.
Who in gulp uses gulp-file-include?
There is a problem: in fact, the inclusions themselves do not work, i.e. it's just that the file is transferred from one place to another without inserting pieces of code that I include. The task code is taken from off. module pages on Npm:

gulp.task('fileinclude', function() { 
gulp.src('./src/*.html') 
.pipe(fileinclude({ 
prefix: '@@', 
basepath: '@file' 
})) 
.pipe(gulp.dest('./src/html/')); 
});

In index.html, I write @@include ('./templates/head.html') in the right place, run the task, it runs without any errors in the console, and the same Index.html file arrives in response, in which instead of of the desired piece of code from the head.html file, the same line with @@include remains the same.
What could be the problem?
Project tree on the screen
5af16a39dfd65844033599.jpeg5af16a4c0deb7958349781.jpeg

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