babel-plugin-git-info

0.1.2 • Public • Published

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:

{
  "plugins": [
    "babel-plugin-git-info"
  ]
}

With options:

{
  "plugins": [
    ["babel-plugin-git-info", { "hashLength": 10 } ]
  ]
}

Via CLI

babel --plugins babel-plugin-git-info script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["babel-plugin-git-info"]
});

Options

hashLength

number, defaults to -1, which means to remain the full length of commit hash.

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-git-info

Weekly Downloads

39

Version

0.1.2

License

MIT

Unpacked Size

336 kB

Total Files

43

Last publish

Collaborators

  • mickmetalholic