Added option for outputting javascript file