babel-plugin-git-info
A babel plugin that generate and insert git information into the files during compilation.
Installation
Use yarn:
yarn add babel-plugin-git-info --dev
or npm:
npm install babel-plugin-git-info --save-dev
Usage
Via .babelrc (Recommended)
.babelrc
Without options:
With options:
Via CLI
babel --plugins babel-plugin-git-info script.js
Via Node API
;
Options
hashLength
number
, defaults to -1
, which means to remain the full length of commit hash.