I have html file width css file included in head section that has been minified with cssmin, additionally the html has been minified with htmlmin grunt task succesfully, but there is a little problem with html minified, the css and javascript included directly on the head secction is not minified by htmlmin, obiously this task if for html, not for css or javascript.
How I can minify css and javascript included in head section?
for example: this is my Dummy initial html file:
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Some title</title>
<link href="mycss.min.css" type="text/css" rel="stylesheet">
<style>
.class1 {
color: black;
/* some other properties */
}
.class2 {
color: white;
/* some other properties */
}
/* more and more classes */
</style>
</head>
<body>
Some html code
</body>
</html>
When I run htmlmin grunt task the result are this:
<!DOCTYPE html><html lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8" /><title>Some title</title><link href="mycss.min.css" type="text/css" rel="stylesheet"><style>
.class1 {
color: black;
/* some other properties */
}
.class2 {
color: white;
/* some other properties */
}
/* more and more classes */
</style></head><body>Some html code</body></html>
Notice that all is minified except the css and some javascript code that I has omitted in this example in the head section