Skip to content

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

Merged
merged 2 commits into from
Dec 19, 2016

Conversation

devversion
Copy link
Member

@devversion devversion commented Dec 17, 2016

  • For releases, the HTML and CSS assets will be minified before being inlined into the built JS

@jelbourn Basically as mentioned on Slack, I had to decouple the :rollup task from the inlining, so we can control the inlining of the resources.

Closes #2066

* For releases, the HTML and CSS assets will be minified before being inlined into the built JS
@devversion devversion requested a review from jelbourn December 17, 2016 09:52
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 17, 2016
@@ -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');
Copy link
Member

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})))
Copy link
Member

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?

@devversion
Copy link
Member Author

@jelbourn Made the requested changes.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Dec 19, 2016
@jelbourn jelbourn merged commit 28f1f80 into angular:master Dec 19, 2016
@devversion devversion deleted the chore/minify-html-css-release branch December 19, 2016 18:18
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Production release uses minified html and css
3 participants