I would like to change the content of an HTML file for a build, like this:
<!-- build:css css/tidy.css -->
<link rel="stylesheet" href="css/main.css">
<!-- /build -->
To generate the HTML file I am using Jade:
//
build:css css/tidy.css
link(href='css/main.css', rel='stylesheet', type='text/css')
//
/build
When Jade finishes creating the HTML files, this is the output:
<!--build:css css/tidy.css
-->
<link href="css/main.css" rel="stylesheet" type="text/css">
<!--/build
-->
The lack of space after the two dashes at the beginning and the line break at the end of each comment, prevent Processhtml to do its job. Is there a way to fix this automatically? Like an option in the task or another grunt plugin? Thanks.
Try like this:
// build:css css/tidy.css
Or write html directly in jade:
<!-- build:css css/tidy.css -->
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.