Check out the documentation to see the available options.
npm install -D fly-useref
Check Flyfile.js and test directory :)
yield this.clear("test/index.html")
yield this
.source("test/src/index.html")
.useref()
.target("test")
before
<html>
<head>
<!-- build:css css/combined.css -->
<link href="css/one.css" rel="stylesheet">
<link href="css/two.css" rel="stylesheet">
<!-- endbuild -->
</head>
<body>
<!-- build:js scripts/combined.js -->
<script type="text/javascript" src="scripts/one.js"></script>
<script type="text/javascript" src="scripts/two.js"></script>
<!-- endbuild -->
<!-- build:js scripts/async.js async data-foo="bar" -->
<script type="text/javascript" src="scripts/three.js"></script>
<script type="text/javascript" src="scripts/four.js"></script>
<!-- endbuild -->
</body>
</html>
after
<html>
<head>
<link rel="stylesheet" href="css/combined.css">
</head>
<body>
<script src="scripts/combined.js"></script>
<script src="scripts/async.js" async data-foo="bar"></script>
</body>
</html>
MIT © Tomoyuki Kashiro et al