-
Notifications
You must be signed in to change notification settings - Fork 3k
Minify inline #823
base: master
Are you sure you want to change the base?
Minify inline #823
Changes from 1 commit
fbcafef
76af76f
278c4b7
11846bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,6 +154,18 @@ gulp.task('html', () => { | |
| removeStyleLinkTypeAttributes: true, | ||
| removeOptionalTags: true | ||
| }))) | ||
| .pipe($.if('*.html', $.minifyInline({ | ||
| js: { | ||
| output: { | ||
| comments: true | ||
| } | ||
| }, | ||
| jsSelector: 'script[type!="text/x-handlebars-template"]', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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[do-not-minify!="true"]' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. Just for context, both this and the handlebar exclusion are straight up from the |
||
| }))) | ||
| // Output files | ||
| .pipe($.if('*.html', $.size({title: 'html', showFiles: true}))) | ||
| .pipe(gulp.dest('dist')); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, this keeps the comments in the output. I don‘t think a production build should have comments.