Extract javascript files from html documents and replace by build result