Find and replace all the dependencies in a JS or CSS file.