git-version-json
Generate a json variable with git version informations.
It is NOT a gulp plugin, but gulp friendly. It is usually use with gulp-replace, gulp-header or gulp-footer. It is also can use separatedly.
The generated json looks like as:
var gitVersion="branch":"master""rev":"2""hash":"53d4271""hash160":"53d4271d8d7e7647fabc0d5086acd4f000a04046";
Check index.js
Sample
var gulp = ;var concat = ;var replace = ;var header = ;var footer = ;var GitVersionJson = ; // automatic use git-rev in version field of package.jsongulp; // this is the same to use 'GitVersionJson.taskPkgVersion'gulp; // add a header json variablegulp; // add a footergulp;
A complete sample locates in ali-mns/gulpfile.js
Privacy Policy
We collect information about how you use the git-version-json
packages for better service.
By default a tracing information is sent to google analytics when fetching version number, The tracing information contains only a rev number. Any of your data will not be sent. You can check code about data collection.
You can always disable data collection as you wish.
var GitVersionJson = ; // Disable google analytics data collection GitVersionJson;
License
MIT