What makes this task Gulp?

What makes this problem besides copying the file index.html in the distrib?
gulp.task('copy:index.html', () => {
 const hash = ssri.fromData(
fs.readFileSync('node_modules/jquery/dist/jquery.min.js'),
 {algorithms: ['sha256']}
);
 let version = pkg.devDependencies.jquery;
 let modernizrVersion = pkg.devDependencies.modernizr;

gulp.src(`${dirs.src}/index.html`)
 .pipe(plugins().replace(/{{JQUERY_VERSION}}/g, version))
 .pipe(plugins().replace(/{{MODERNIZR_VERSION}}/g, modernizrVersion))
 .pipe(plugins().replace(/{{JQUERY_SRI_HASH}}/g, hash.toString()))
.pipe(gulp.dest(dirs.dist));
});
June 3rd 19 at 19:26
1 answer
June 3rd 19 at 19:28
Solution
Gets the sha256 hash of the file directory, jquery, reads from a package.json versions of packages and replace within the html file, certain placeholders for these values. For example, the line {{JQUERY_VERSION}} will be replaced with the version of jquery.

Find more questions by tags Gulp.js