Wikia/mercury — pull request #448 by aquilax (2014-12-09 08:07:01+00:00)
Title: Add CDN support for public assets

The way this is currently handled may seem crude (using string replace to add the variable prefix), but practically that is almost what `gulp-rev-replace` does. I created a pull request to the plugin to add prefix support but it still feels clumsy.

The process here is:
- On production build replace `/public/` with `{{server.cdnBaseUrl}}/public/`
- `cdnBaseUrl` is added to `localSettings.base.ts` and exported to the template if environment is production.

If given empty value to `cdnBaseUrl`, assets will be served by the service.

In case we need variant CDN URL-s, {{server.cdnBaseUrl}} can be replaced with handlebars helper. But given the fact that we currently have three static assets to serve (2 js/1 css files). This solution should be faster. :leaves: