Node Git Info JSON
This module outputs a git.properties.json
file with some git commit information.
It was created because we created a Node Express app with a /info
endpoint that serves some git information.
Usage
Globally
npm i -g node-git-info-jsonnode-git-info-json [options] -d, --directory # Directory to save the file to, default is the cwd
Project Level
- Install as dev dependency
npm i -D node-git-info-json
- Add to
package.json
scripts, example below:
- Run script as part of npm command
npm run git-info
Sample Output
git.properties.json
Acknowledgements
Basically a fork from the node-git-info project but the output is a .json
file instead of a .properties
file which is much easier to parse in a Node project.