skip hidden files and non-javascript files