You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At work I inherited a JavaScript templating project which is built using Google Closure Templates and I am trying to convert it into a CI/CD project, make it open and let others use it and contribute to it.
Background
The project was created so that web applications and sites that use our template just have to point to a server setup as a CDN that hosted our files.
Issue
All our paths were set with an .environment template with if conditions for different servers our files reside on.
/**
* @param cdnEnv Used to switch between qat, dev, and prod implementations.
*/
{template .environment}
/**{@param cdnEnv}*/
{if $cdnEnv=='qat'}
https://qat.domain.com
{elseif $cdnEnv=='dev'}
https://dev.domain.com
{else}
https://domain.com{/if}/ourfiles/
{/if}
{/template}
Then we call it in the different templates to access our resource files (css, js, images, etc...)
I want our templates to work no matter where we host the files, but if I change the paths to relative to the JS, once it gets injected in the page, it becomes relative to the page itself and breaks.
Is there a way to achieve this?
Thank you for your time,
Shawn
The text was updated successfully, but these errors were encountered:
At work I inherited a JavaScript templating project which is built using Google Closure Templates and I am trying to convert it into a CI/CD project, make it open and let others use it and contribute to it.
Background
The project was created so that web applications and sites that use our template just have to point to a server setup as a CDN that hosted our files.
Issue
All our paths were set with an .environment template with if conditions for different servers our files reside on.
Then we call it in the different templates to access our resource files (css, js, images, etc...)
I want our templates to work no matter where we host the files, but if I change the paths to relative to the JS, once it gets injected in the page, it becomes relative to the page itself and breaks.
Is there a way to achieve this?
Thank you for your time,
Shawn
The text was updated successfully, but these errors were encountered: