{"_id":"@barretter/last-release-git-info-plugin","_rev":"2-cb27b9fd0b9012ce02b74c1bf5284295","name":"@barretter/last-release-git-info-plugin","dist-tags":{"latest":"1.2.0"},"versions":{"1.1.0":{"name":"@barretter/last-release-git-info-plugin","version":"1.1.0","description":"webpack plugin for create git info when build","author":{"name":"https://github.com/barretem"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/barretem/last-release-git-info-plugin.git"},"keywords":["webpack","plugin","git","commit"],"main":"index.js","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","stdver":"standard-version -m '[skip ci] chore(release): v%s'"},"dependencies":{"fs-extra":"^10.0.0","lodash.get":"^4.4.2"},"devDependencies":{"husky":"^7.0.0","lint-staged":"^11.0.0","prettier":"2.3.2","standard-version":"^9.3.0"},"lint-staged":{"*.@(md|json)":["prettier --write","git add"],"*.js":["prettier --write","git add"]},"gitHead":"8f27b292722b2949bda6c5b923203af016749363","bugs":{"url":"https://github.com/barretem/last-release-git-info-plugin/issues"},"homepage":"https://github.com/barretem/last-release-git-info-plugin#readme","_id":"@barretter/last-release-git-info-plugin@1.1.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-WhyUwxEkhvRkRrZH6SFsQjM2xSElasH4j0F3w9AKgZJfJnZWeCfMUZxMB84AKclch7ed1sxMIyYhb82iXpuyKw==","shasum":"935c3df75790b135decf31ffe3846a5ed3be28b3","tarball":"https://registry.npmjs.org/@barretter/last-release-git-info-plugin/-/last-release-git-info-plugin-1.1.0.tgz","fileCount":10,"unpackedSize":13565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4BlLCRA9TVsSAnZWagAA2VsP+gLi1+nvbToPgzJFmV0t\nN28CsXYeRTzBlhoCTcLeNqRmrsEUNOeyRfPFodm67yZLDVqDspylwTm0K61s\nfm6LikbEU6KmbGg2rVFnd1PDudUAy2Tz1mq4QnclXRsKhvsLlS+8n04nCBkH\n5aAJ4hlMJgpaWLXUxcuD8VODr/BJDI2ZavCr0yCEq6xVmK6jwewfC/shrUTc\ncEohnffK2vYm1aFW2RTzjDp4IHiPkorA8S6htMTRjiA3V3Ozl7n4CrXvbqwo\nBbCDwV1Tv1HlI4/kUwMPtFmyZ2TXx7Ha0yj4sC1hw3u+/IU5xtIaKV9Y41ra\nQAA7bLaTWSO3r+xhgRQsc7eOvUoOR+qjb6PP1FQrOhvL1ElsTEuis7/MRkQF\nP2Ld7utSn0lXz5T7hgCEgtUv3Id3h5HJH6jPj8Cyowx0nyeEhTFfzJVnhafO\no67goAB2nHuZIZNcsmLH4GpJOzuBr44wx1GYzBzMQG7XlvI84brcy5eC9gMe\nlqaZMTAbt+I0LeWNIXPJwwDYhFuzG5uQzTDbI8iKa4v1sIJ3uYXDKD1Zi0f3\n8C0zmozNBeP2M5xj6l+AyC79QPLHGj9t0RsgyQl0n8pvkOasSNsUYGjBCLgO\nFGwbSsrF1Y/j+ZQ4g1P/6rInaRZyLQLMs3Q0k6HUOguCEg7qgUy3jiRMBHhz\nuWcX\r\n=QF5+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHySqiGytHI28tbknkah+/zoSuCoa16+MP+hxyBhkh09AiARfosc/hmj9Ju/rrl/YlLTsynUbq3vrnCBCAAPbM47Jg=="}]},"_npmUser":{"name":"barretem","email":"1178310248@qq.com"},"directories":{},"maintainers":[{"name":"barretem","email":"1178310248@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/last-release-git-info-plugin_1.1.0_1625299275041_0.2524548694412445"},"_hasShrinkwrap":false},"1.2.0":{"name":"@barretter/last-release-git-info-plugin","version":"1.2.0","description":"webpack plugin for create git info when build","author":{"name":"https://github.com/barretem"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/barretem/last-release-git-info-plugin.git"},"keywords":["webpack","plugin","git","commit"],"main":"index.js","publishConfig":{"access":"public"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","stdver":"standard-version -m '[skip ci] chore(release): v%s'"},"dependencies":{"fs-extra":"^10.0.0","lodash.get":"^4.4.2"},"devDependencies":{"husky":"^7.0.0","lint-staged":"^11.0.0","prettier":"2.3.2","standard-version":"^9.3.0"},"lint-staged":{"*.@(md|json)":["prettier --write","git add"],"*.js":["prettier --write","git add"]},"gitHead":"0621511c2bded3a012ba8c36a7f88bfae2a47399","bugs":{"url":"https://github.com/barretem/last-release-git-info-plugin/issues"},"homepage":"https://github.com/barretem/last-release-git-info-plugin#readme","_id":"@barretter/last-release-git-info-plugin@1.2.0","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-UF+7KgCEc/jGo53AjxtO7OFoDRZ/NzIOi4romtGkDUj42Tg+F78JJ/DBkmuEF+X1ySMhOa3fvykAcVKWrr/LSQ==","shasum":"4fbdd20b9341933a08f0e3601313e0dfbe68ecfe","tarball":"https://registry.npmjs.org/@barretter/last-release-git-info-plugin/-/last-release-git-info-plugin-1.2.0.tgz","fileCount":10,"unpackedSize":15140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5A1dCRA9TVsSAnZWagAANroP/RVViWNr+gHTtEajbECl\n/0+5VdefNZHDrFinbId4ZAochgpJBox9raEdwmrwCs1SZIk8pBbgrDambJFC\nypKxiUs2ri/nZ6CpkOoxaXg4ao8Bx58PIcvGfp22REyhLrGYRJGgOMvaVqGN\nrwedRRzwclqgMQbZyUJdi51ff4ZBou21OVqtoPcHoC5TZhEIl2xZEQHMmFoF\ntj06XZqOEPRFnfRcyZlbDxlsmGlrf8RzyR/dkv9GRjQpex3yRpAqRYxjZv4H\nqt6gkmHt58Cb+M1xBxNfXNvdDYM2Gsq5o4ZuSqfE3ZalHY021phmFNPxpyVc\nswubvcWQ4LFsQdZVc6+PTC41qIXvqQwQe9qOE78c6KUZxjzV/eS9T1a2/TA9\n9+kV052EvRCDs95TkZD/TnAKnH6kKhoxjqUd0uL6Of1M1Q8r4YM/vFTz7W1c\nwzgWr0qR1TvKt2uLahUrtNCM1dzXUHr08ZJ2QTjSE+GqYIzdq6PLFRAQPL/k\nbl/6PHutkA5eXuNUPhZvSGX3WSjXZCl8K+fqzZtrjD4s9x1LZnDef7yV9IPn\nmWKp0fepqr2+KAAKKKTAS12BiYJ1CSWf7fHqSwZ2nBmSn8L3bDrfPWi70+Sl\nLf55QdBJBBPMfYF5IUOj10a6rVuZyrNjDdOgQx+Pt4mWS3WRQo5MWgu3hnDT\nKsdY\r\n=we+w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQcZOYuWjgu0uCdYaCtl9hCWT0CoyeAp9Ey8bqx2nrEAIgFNLpY47D3+z0B+wktYDK1xZfFA8chG/Q1FcHOdTDUGo="}]},"_npmUser":{"name":"barretem","email":"1178310248@qq.com"},"directories":{},"maintainers":[{"name":"barretem","email":"1178310248@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/last-release-git-info-plugin_1.2.0_1625558364745_0.14378187350132787"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-03T08:01:14.668Z","1.1.0":"2021-07-03T08:01:15.182Z","modified":"2022-04-04T17:44:32.743Z","1.2.0":"2021-07-06T07:59:24.873Z"},"maintainers":[{"name":"barretem","email":"1178310248@qq.com"}],"description":"webpack plugin for create git info when build","homepage":"https://github.com/barretem/last-release-git-info-plugin#readme","keywords":["webpack","plugin","git","commit"],"repository":{"type":"git","url":"git+https://github.com/barretem/last-release-git-info-plugin.git"},"author":{"name":"https://github.com/barretem"},"bugs":{"url":"https://github.com/barretem/last-release-git-info-plugin/issues"},"license":"MIT","readme":"# last-release-git-info-plugin\n\n## Table of Contents\n\n- [last-release-git-info-plugin](#last-release-git-info-plugin)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Install](#install)\n  - [Usage](#usage)\n    - [在webpack项目中使用](#在webpack项目中使用)\n    - [在vue-cli中使用](#在vue-cli中使用)\n    - [在nuxt.js中使用](#在nuxtjs中使用)\n  - [Options](#options)\n    - [options.buildLog](#optionsbuildlog)\n    - [options.log](#optionslog)\n    - [options.generateFile](#optionsgeneratefile)\n    - [options.releaseFileName](#optionsreleasefilename)\n    - [options.showBuildTime](#optionsshowbuildtime)\n    - [options.showBuildBranch](#optionsshowbuildbranch)\n    - [options.showBuildCommitId](#optionsshowbuildcommitid)\n    - [options.showDeveloperName](#optionsshowdevelopername)\n    - [options.showDeveloperEmail](#optionsshowdeveloperemail)\n    - [options.showBuildCommitDate](#optionsshowbuildcommitdate)\n    - [options.showBuildCommitInfo](#optionsshowbuildcommitinfo)\n    - [options.externalTxt](#optionsexternaltxt)\n  - [Notice](#notice)\n  - [License](#license)\n\n## Features\n\n在构建的时候可以根据配置在**浏览器控制台**，以及**构建终端**的时候输出最新一次的构建信息（包括构建时间、构建分支、构建commitID、最近开发者名称、最近开发者邮箱、最新commit日期、最新commit信息）。注意：由于这些信息属于敏感信息，在生产环境不能在控制台输出这些构建信息！！生成的txt文件可以通过反爬虫防止爬虫爬取。\n\n生成的信息如下：\n\n```shell\n*********************************************************************\n构建日期: 2021-7-6 15:14\n构建分支: main\n构建commit:6539e75f3cf5686eda6892bce5986ae4674cf227\ncommit时间:2021-7-3 16:03\n说明:feat: 🎸 添加access\n*********************************************************************\n```\n\n[⬆ Back to Top](#table-of-contents)\n\n## Install\n\n```console\nyarn add @barretter/last-release-git-info-plugin -D\n```\n\n[⬆ Back to Top](#table-of-contents)\n\n## Usage\n该插件依赖git项目，需要结合git项目使用\n\n### 在webpack项目中使用\n```js\nconst LastReleaseGitInfoPlugin = require('@barretter/last-release-git-info-plugin')\n\nconst config = {\n  plugins: [\n    new lastReleaseGitInfoPlugin(options)\n  ]\n}\n```\n\n\n### 在vue-cli中使用\n\nvue.config.js\n```js\nconst LastReleaseGitInfoPlugin = require('@barretter/last-release-git-info-plugin')\nconst config = {\n  chainWebpack: config => {\n    config.plugin('last-release-git-info-plugin').use(LastReleaseGitInfoPlugin, [options])\n  }\n}\n```\n\n### 在nuxt.js中使用\n\nnuxt.config.js\n```js\nconst config = {\n  modules: ['@barretter/last-release-git-info-plugin/nuxt', options]\n}\n```\n\n就这么简单！\n\n[⬆ Back to Top](#table-of-contents)\n\n## Options\n\n### options.buildLog\n\n- Type: `boolean`\n- Default: `false`\n\n是否在构建的时候输出最新一次的构建信息。\n\n### options.log\n\n- Type: `boolean`\n- Default: `false`\n\n是否在浏览器控制台输出最新一次的构建信息。\n\n### options.generateFile\n\n- Type: `boolean`\n- Default: `false`\n\n是否生成构建信息文件。\n\n### options.releaseFileName\n\n- Type: `string`\n- Default: `release_git_info.txt`\n\n最新构建信息的保存文件名。\n\n### options.showBuildTime\n\n- Type: `boolean`\n- Default: `true`\n\n是否显示构建时间\n\n### options.showBuildBranch\n\n- Type: `boolean`\n- Default: `true`\n\n是否显示构建分支\n\n### options.showBuildCommitId\n\n- Type: `boolean`\n- Default: `true`\n\n是否显示构建commitID\n\n### options.showDeveloperName\n\n- Type: `boolean`\n- Default: `false`\n\n是否显示开发者名称\n\n### options.showDeveloperEmail\n\n- Type: `boolean`\n- Default: `false`\n\n是否显示开发者邮箱\n\n### options.showBuildCommitDate\n\n- Type: `boolean`\n- Default: `true`\n\n是否显示commit日期\n\n### options.showBuildCommitInfo\n\n- Type: `boolean`\n- Default: `true`\n\n是否显示commit信息\n\n### options.externalTxt\n\n- Type: `string`\n- Default: `''`\n\n额外显示的字段\n\n\n## Notice\n\n目前该插件暂时不支持webpack5\n\n## License\n\n[MIT](./LICENSE)\n\n[⬆ Back to Top](#table-of-contents)\n","readmeFilename":"README.md"}