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

Howto dynamic generate filepath in runtime? #224

Open Troland opened 7 years ago

Troland commented 7 years ago

I have a idea such as for example:

<!DOCTYPE html>
<html>
<head>
    <title>My index</title>
    <!-- build:css css/combo{+new Date()}.css -->
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/common.css">
    <!-- endbuild -->
</head>
<body>
    <h1>Documents</h1>
</body>
</html>

if i have multiplage, and i just want to write the filepath in such format css/combo{+new Date()}.css`, any clues?

ericzon commented 7 years ago

+1 would be great to be able to generate dynamic output paths