added logic for generating javascript require file