Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,18 @@ gulp.task('html', () => {
removeStyleLinkTypeAttributes: true,
removeOptionalTags: true
})))
.pipe($.if('*.html', $.minifyInline({
js: {
output: {
comments: false
}
},
jsSelector: 'script[type!="text/x-handlebars-template"]',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, we don't use handlebars in the project. We shouldn't add exclusions to things not used in the repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This either needs to be removed or we need to do something custom like the cssSelector one. We should not have ignores for things our repo doesn't use.

css: {
keepSpecialComments: 1
},
cssSelector: 'style[data-do-not-minify!="true"]'
})))
// Output files
.pipe($.if('*.html', $.size({title: 'html', showFiles: true})))
.pipe(gulp.dest('dist'));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"gulp-if": "^2.0.0",
"gulp-imagemin": "^2.0.0",
"gulp-load-plugins": "^1.0.0",
"gulp-minify-inline": "^0.1.1",
"gulp-newer": "^1.0.0",
"gulp-sass": "^2.0.0",
"gulp-size": "^2.0.0",
Expand Down