This module helps you to include files, that you've listed in a simple HTML comment.
New files will be generated with the correct tags and files.
It's something like grunt-include-source
Example gulp task:
const includeSource = require("gulp-include-sources");
gulp.task("default", function(){
return gulp.src("./test/src/*.html")
.pipe(includeSource())
.pipe(gulp.dest("./test/dest/"));});
}`
That's inside /src/index.html:
``
That's going to be generated (if the files exist):
`'`
When listed files are not found, the comment won't be replaced and you will get a warning in the console.
Default configuration:
const DEFAULT_OPTIONS = {
includesDir: "./",
prefix: "",
debug: false,
templates: {
"js": '',
"css": ''
}
};