-
Notifications
You must be signed in to change notification settings - Fork 6.8k
chore: minify html and css for releases #2262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: minify html and css for releases #2262
Conversation
* For releases, the HTML and CSS assets will be minified before being inlined into the built JS
@@ -8,6 +8,9 @@ import {writeFileSync} from 'fs'; | |||
// No typings for these. | |||
const inlineResources = require('../../../scripts/release/inline-resources'); | |||
const rollup = require('rollup').rollup; | |||
const gulpMinifyCSS = require('gulp-clean-css'); | |||
const gulpMinifyHTML = require('gulp-htmlmin'); |
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.
gulpMinifyCss
and gulpMinifyHtml
/** Minifies the HTML and CSS assets in the distribution folder. */ | ||
task(':build:components:assets:minify', () => { | ||
return src('**/*.+(html|css)', { cwd: DIST_COMPONENTS_ROOT}) | ||
.pipe(gulpIf(/.css$/, gulpMinifyCSS(), gulpMinifyHTML({collapseWhitespace: true}))) |
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.
Also caseSensitive: true
, removeComments: true
?
@jelbourn Made the requested changes. |
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.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
@jelbourn Basically as mentioned on Slack, I had to decouple the
:rollup
task from theinlining
, so we can control the inlining of the resources.Closes #2066