adambuczek
11/24/2016 - 6:00 PM

Find local assets and replace paths to CDN versions; use after gul build on production

Find local assets and replace paths to CDN versions; use after gul build on production

# find every reference to local file in CSS
sed 's/url([" ]\.\.\(.*\)[" ])/url(https:\/\/cdn.domain.com\1)/g' dist/styles/main.css | grep url # GLOBAL wont work
# WIP
#sed -i -r "s@(<(?!a)[\^>]+?)(src|href|data-src)=[\"\'](?!https?:)(?!\/\/)(.+?)[\"\']@\1\2="https://cdn.return2games.com/\3\"@g" index.html