parcel-plugin-git-sha
v1.0.1
Published
Parcel plugin to read information about code version (Git SHA) from env variable.
Downloads
103
Readme
parcel-plugin-git-sha
Parcel plugin to read information about Git SHA from env variable.
Install
# npm
npm i -D parcel-plugin-git-sha
# or yarn
yarn add -D parcel-plugin-git-sha
How to use
This plugin puts the build date in an environment variable named GIT_SHA
.
you can retrive it in js like this: process.env.GIT_SHA
javascript
console.log("Code version: " + process.env.GIT_SHA);
output
Code version: 164b559e3b93eb4c42ff21b1e9cd9774d031bb38