├── README.md ├── index.js ├── package.json └── zh_CN.md /README.md: -------------------------------------------------------------------------------- 1 | # Html commit version plugin 2 | 3 | Simple [webpack](https://webpack.js.org/) plugin that generates `CommitInfo` and `VERSION` insert index.html during build. 4 | 5 | English | [简体中文](./zh_CN.md) 6 | ## Usage 7 | 8 | Given a **webpack 4** project, install it as a local development dependency: 9 | 10 | ```bash 11 | npm install html-commit-version-plugin --save-dev 12 | ``` 13 | 14 | Then, simply configure it as a plugin in the webpack config: 15 | 16 | ```javascript 17 | var HtmlGitVersionPlugin = require("html-commit-version-plugin"); 18 | 19 | module.exports = { 20 | plugins: [ 21 | new HtmlGitVersionPlugin() 22 | ], 23 | }; 24 | ``` 25 | 26 | It outputs a `VERSION` and `commitInfo` such as: 27 | 28 | ```html 29 | 35 | 36 | 37 |
38 | 39 | 40 |