Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Html task#839

Merged
surma merged 7 commits intowsk2from
html-task
Feb 24, 2016
Merged

Html task#839
surma merged 7 commits intowsk2from
html-task

Conversation

@gauntface
Copy link
Copy Markdown

This adds a task to manage html pages in the build process.

Major thing this does is:

  • Minify HTML
  • Inline CSS and JS if the tags have an 'inline' attribute

Things this doesn't currently do (and not sure if we want to do this) - minify / optimise inline styles and javascript.

@addyosmani @surma + anyone else who has any ideas for improving this / anything we might be missing.


<!-- By adding the 'inline' attribute, the build process will inline
this CSS file to improve load time performance-->
<link rel="stylesheet" href="/styles/index.css" type="text/css" inline>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To be 100% compliant, should we use data-inline? Or is inline an official attribute?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

We can customise the attribute, so data-inline sounds like a great idea tbh

@surma
Copy link
Copy Markdown
Contributor

surma commented Feb 22, 2016

Only one minor nit and I am not even sure we can do anything about that.

Also tests.

@Garbee
Copy link
Copy Markdown
Contributor

Garbee commented Feb 22, 2016

The auto-inlining clashes with work in PR #823 from another contributor. Maybe merge that in and then do an upgrade to the implementation?

@surma
Copy link
Copy Markdown
Contributor

surma commented Feb 22, 2016

@Garbee This branch is a completely new tree (orphan). No clashing will ever happen :)

@Garbee
Copy link
Copy Markdown
Contributor

Garbee commented Feb 22, 2016

oh, just noticed going into a 2.x branch. Yea nvm then.

@gauntface
Copy link
Copy Markdown
Author

BUT . . . . . @Garbee thanks for bringing it to me attention - was a great feature to add in.

@gauntface
Copy link
Copy Markdown
Author

@surma happy with the current state?

I'm seeing some flakiness on the html watch task - will have to keep an eye on it.

surma added a commit that referenced this pull request Feb 24, 2016
@surma surma merged commit 1a352ef into wsk2 Feb 24, 2016
@surma surma deleted the html-task branch February 24, 2016 11:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants