jonkemp / gulp-useref

Parse build blocks in HTML files to replace references to non-optimized scripts or stylesheets.
MIT License
705 stars 93 forks source link

Possible to specify which build? #190

Closed lpommers closed 8 years ago

lpommers commented 8 years ago

I'm wondering if it is possible to specify which build you want use useref on.

<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/anotherCombined.js -->
    <script type="text/javascript" src="scripts/one.js"></script>
    <script type="text/javascript" src="scripts/two.js"></script>
    <!-- endbuild -->
</body>
</html>

For instance, in this example, if I only want to useref for combined.js, is this possible? I know I could run all three and then filter for the file I want, but I'd rather just cut down the over build time.