support multiple targets,new configurations flags, compact js and html