html5 - Minify CSS included in html header with grunt task -


i have html file width css file included in head section has been minified cssmin, additionally html has been minified htmlmin grunt task succesfully, there little problem html minified, css , javascript included directly on head secction not minified htmlmin, obiously task if html, not css or javascript.

how can minify css , javascript included in head section?

for example: 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;             /* other properties */         }          .class2 {             color: white;             /* other properties */         }          /* more , more classes */     </style> </head> <body>     html code </body> </html> 

when run htmlmin grunt task result 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;             /* other properties */         }          .class2 {             color: white;             /* other properties */         }          /* more , more classes */ </style></head><body>some html code</body></html> 

notice minified except css , javascript code has omitted in example in head section


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -