tactivos/grunt-cdn — pull request #8 by pdhodgkinson (2013-04-09 17:56:18+00:00)
Title: Support for protocol-relative CDN URLs

Protocol-relative URLs allow the dynamic resolution of asset protocols using the current page protocol (typically HTTP or HTTPS) rather than hard-coding to one or the other.
The current issue is caused by the path.join command which removes all double-slashes.
The fix will detect the double-slash at the begining of the defined CDN value (interpreting it as a protocol-relative URL), and re-add the double-slash after path.join has completed, if applicable.

For example:
cdn: '//cdn.cloudfront.net/container/'

Before patch would result in URLs like:
/cdn.cloudfront.net/container/some_static_asset.js

After patch:
//cdn.cloudfront.net/container/some_static_asset.js