Skip to content

Commit

Permalink
modify gulpfile to adapt cdnjs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hifocus committed Jun 15, 2023
1 parent 76ed581 commit c2b0519
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ gulp.task('minify-html', async function () {
.pipe(gulp.dest('./'));
});

gulp.task('temp-copy', function() {
return gulp.src('assets/bundles/function.main.js')
.pipe(rename('function_main.js'))
.pipe(gulp.dest('assets/bundles'))
.pipe(gulp.src('assets/bundles/style.main.css'))
.pipe(rename('style_main.css'))
.pipe(gulp.dest('assets/bundles'));
});

gulp.task('replace-js-css', function (done) {
return gulp.src('./merger.html')
.pipe(htmlreplace({
Expand All @@ -67,5 +76,5 @@ gulp.task('build-html', async function () {
gulp.start('minify-html');
})

gulp.task('compile', gulp.parallel('pack-css', 'pack-js'));
gulp.task('compile', gulp.series(gulp.parallel('pack-css', 'pack-js'), 'temp-copy'));
gulp.task('default', gulp.series('replace-js-css', gulp.parallel('minify-html', 'pack-js', 'pack-css' )));

0 comments on commit c2b0519

Please sign in to comment.