Update generate.php

add pretty print for composer.json