{"id":17099925,"url":"https://github.com/kuangpf/umi-plugin-build-info","last_synced_at":"2025-04-09T15:12:01.220Z","repository":{"id":232018831,"uuid":"783260676","full_name":"KuangPF/umi-plugin-build-info","owner":"KuangPF","description":"umi@4 插件，用于在生产环境展示版本构建信息以及对应的版本最后一次 git 提交记录","archived":false,"fork":false,"pushed_at":"2024-12-11T13:59:24.000Z","size":371,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T15:11:56.308Z","etag":null,"topics":["build","deploy","umi","umi-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KuangPF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-07T11:51:59.000Z","updated_at":"2024-12-11T13:59:28.000Z","dependencies_parsed_at":"2024-04-14T09:26:24.238Z","dependency_job_id":null,"html_url":"https://github.com/KuangPF/umi-plugin-build-info","commit_stats":null,"previous_names":["kuangpf/umi-plugin-build-info"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangPF%2Fumi-plugin-build-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangPF%2Fumi-plugin-build-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangPF%2Fumi-plugin-build-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KuangPF%2Fumi-plugin-build-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KuangPF","download_url":"https://codeload.github.com/KuangPF/umi-plugin-build-info/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055276,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","deploy","umi","umi-plugin"],"created_at":"2024-10-14T15:11:48.036Z","updated_at":"2025-04-09T15:12:01.180Z","avatar_url":"https://github.com/KuangPF.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# umi-plugin-build-info\n\numi@4 插件，用于在生产环境展示版本构建信息以及对应的版本最后一次 git 提交记录。\n\n[![NPM version](https://img.shields.io/npm/v/umi-plugin-build-info.svg?style=flat)](https://npmjs.org/package/umi-plugin-build-info) [![NPM downloads](http://img.shields.io/npm/dm/umi-plugin-build-info.svg?style=flat)](https://npmjs.org/package/umi-plugin-build-info)\n\n## Install\n\n```bash\npnpm i umi-plugin-build-info -D\n```\n\n## Usage\n\nConfigure in `.umirc.ts`,\n\n```js\nexport default {\n  plugins: ['umi-plugin-build-info'],\n}\n```\n\n在生产环境浏览器控制台中，访问 `buildInfo` 变量即可：\n\n```\nwindow.buildInfo\n\n\u003c!--\n{\n  buildTime: '2024/4/7 17:06:02', \n  lastCommit: '[11e031b]: chore(deps): add build-info umi plugin, Sun Apr 7 17:05:45 2024 +0800',\n  tag: 0.0.1\n}\n--\u003e\n```\n\n## Options\n\n```js\nexport default defineConfig({\n  buildInfo: {\n    debug: true,\n    injectAlways: false,\n    buildInfoKey: 'buildInfo_xxx',\n  },\n})\n```\n\n| 配置项       | 类型    | 默认值    | 说明                             |\n| ------------ | ------- | --------- | -------------------------------- |\n| debug        | boolean | false     | 是否开启调试模式                 |\n| injectAlways | boolean | false     | 是否总是注入变量，默认 `production` 环境才会注入 |\n| buildInfoKey | string  | buildInfo | 构建信息注入在 window 中的变量值 |\n\n## LICENSE\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuangpf%2Fumi-plugin-build-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuangpf%2Fumi-plugin-build-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuangpf%2Fumi-plugin-build-info/lists"}