if dest endsWith .js, then combine the src files and write the output into dest