Answer the question
In order to leave comments, you need to log in
Why does @@include in gulp-file-include inside the html page immediately insert the content of the include file?
Hello everyone who worked with gulp-file-include, tell me, plz)
the task looks like this:
gulp.task('fileinclude', function () {
return gulp.src('app/.html')
.pipe(fileinclude({
prefix: '@@',
basepath: '@file'
}))
.pipe(gulp.dest('app'));
});
gulp.task('watch', ['browser-sync', 'css-libs', 'fileinclude', 'scripts'], function () {
gulp.watch('app/*.html', ['fileinclude']);
gulp.watch('app/less/**/*.less', ['less']);
gulp.watch('app/*.html', browserSync.reload);
gulp.watch('app/js/**/*.js', browserSync.reload);
});
@@include('templates/header.html')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question