lasso-js / lasso

Advanced JavaScript module bundler, asset pipeline and optimizer
582 stars 75 forks source link

references to resources from static files #78

Closed yomed closed 9 years ago

yomed commented 9 years ago

From the docs, you can lasso generic resources and get the dynamic urls:

<lasso-resource path="./favicon.ico" var="favicon"/>
<link rel="shortcut icon" href="${favicon.url}">

But some browsers look for static files (json/xml) which hold references to those favicon urls. For example, IE11 looks for this:

<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
    <msapplication>
        <tile>
            <square70x70logo src="/mstile-70x70.png"/>
            <square150x150logo src="/mstile-150x150.png"/>
            <wide310x150logo src="/mstile-310x150.png"/>
            <square310x310logo src="/mstile-310x310.png"/>
            <TileColor>#8bc53f</TileColor>
            <TileImage src="/mstile-150x150.png" />
         </tile>
    </msapplication>
</browserconfig>

Is there a way in lasso to handle these references to point to the correct resources?

philidem commented 9 years ago

@yomed the best thing to do is probably build this XML file with Lasso and Marko. Is that reasonable for you?

yomed commented 9 years ago

Yeah, I think so. I ended up handling all the favicon resources outside of lasso because I think it simplifies things here, but this is more of a special case.