Create json file whit app info on build/run

How can I create a file, json, in compilation time or similar whit app data like : version, package ??

See: https://github.com/ionic-team/ionic-app-scripts