git-revision-html-webpack-plugin

1.0.0 • Public • Published

git-revision-html-webpack-plugin

npm

Webpack plugin can generate the latest git commit hash within html meta tag, which is helpful when checking whether the deployment meets the expectations. It requires html-webpack-plugin.

Installation

npm install git-revision-html-webpack-plugin --save-dev

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin');
const GitRevisionPlugin = require('git-revision-html-webpack-plugin');

module.exports = {
  plugins: [
    new HtmlPlugin(),
    new GitRevisionPlugin()
  ]
}

Output:

<html>
    <head>
        <meta name="git-revision" content="eabf661">
    </head>
</html>

/git-revision-html-webpack-plugin/

    Package Sidebar

    Install

    npm i git-revision-html-webpack-plugin

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.5 kB

    Total Files

    3

    Last publish

    Collaborators

    • fe-luna