{"id":16052194,"url":"https://github.com/accforgit/uipx-webpack-plugin","last_synced_at":"2026-03-04T09:02:30.135Z","repository":{"id":57385388,"uuid":"225380172","full_name":"accforgit/uipx-webpack-plugin","owner":"accforgit","description":":green_book:UI图片对比插件 - webpack插件版本","archived":false,"fork":false,"pushed_at":"2020-02-24T03:20:38.000Z","size":80,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-14T11:12:27.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/accforgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-02T13:21:27.000Z","updated_at":"2023-05-16T08:55:30.000Z","dependencies_parsed_at":"2022-09-09T11:11:26.607Z","dependency_job_id":null,"html_url":"https://github.com/accforgit/uipx-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/accforgit/uipx-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accforgit%2Fuipx-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accforgit%2Fuipx-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accforgit%2Fuipx-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accforgit%2Fuipx-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/accforgit","download_url":"https://codeload.github.com/accforgit/uipx-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accforgit%2Fuipx-webpack-plugin/sbom","scorecard":{"id":162363,"data":{"date":"2025-08-11","repo":{"name":"github.com/accforgit/uipx-webpack-plugin","commit":"e053cfab3f0b6aa955f0efd70315fb29713b9213"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T13:51:19.366Z","repository_id":57385388,"created_at":"2025-08-16T13:51:19.366Z","updated_at":"2025-08-16T13:51:19.366Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30076935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-09T01:07:58.588Z","updated_at":"2026-03-04T09:02:30.119Z","avatar_url":"https://github.com/accforgit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uipx-webpack-plugin\n\n![NPM](https://nodei.co/npm/uipx-webpack-plugin.png?downloads=true\u0026downloadRank=true\u0026stars=true)\n\n![img](https://img.shields.io/npm/v/uipx-webpack-plugin.svg) ![img](https://img.shields.io/bundlephobia/minzip/uipx-webpack-plugin.svg) ![img](https://img.shields.io/github/license/accforgit/uipx-webpack-plugin.svg)\n\nUI图片对比插件，帮助开发者更方便地对比 UI 图与实现效果之间的差异\n\n![img](images/demo1.png)\n\n## Example\n\n[live Demo](https://accforgit.github.io/uipx-webpack-plugin/index.html)\n\n## 安装\n\n### npm\n\n```\nnpm install uipx-webpack-plugin -D\n```\n\n### 外链\n\n可以直接通过外链的方式使用：\n```html\n\u003c!-- 需要在 body 元素中或者后面加载 --\u003e\n\u003cscript src=\"http://accforgit.github.io/lib/uipx/uipx.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\tUIPX({\n    diffImg: 'http://example.com/example.png',\n    opacityColorList: [\n      [255, 255, 255]\n    ]\n  });\n\u003c/script\u003e\n\u003c/html\u003e\n```\n\n## Options\n\n|key|Type|Description|Default|\n|---|---|---|---|\n|enable|boolean|是否开启，建议在测试环境中开启(`true`)，开发环境中关闭(`false`)|`true`|\n|diffImg|string|需要用于对比的 UI原图，可以是 `http`链接也可以是 `base64`，如果是 `http`链接，则因为 `canvas` 的安全性要求，图片链接必须与当前页面同域，可以在这里配置，也可以后续通过插件面板从本地选取|-|\n|opacityColorList|\u003cspan style=\"white-space: nowrap\"\u003enumber[][]\u003c/span\u003e|需要将UI图中进行透明化的色值，例如 `[[255, 255, 255]]`，表示需要将 UI 图中 `rgb`值为 `[255, 255, 255]`的像素的透明度(`opacity`)置为 `0`，这是为了去除无关像素，减少视线干扰，可以在这里配置，也可以后续在插件面板中进行配置|-|\n\n## 使用\n\n`webpack.conf.js` 文件配置里增加以下插件配置即可\n\n```js\n// 引入插件\nvar UIPXPlugin = require('uipx-webpack-plugin'); \n\nmodule.exports = {\n  ...\n\n  plugins: [\n    new UIPXPlugin({\n      diffImg: 'http://example.com/example.png',\n      opacityColorList: [\n        [255, 255, 255]\n      ],\n      enable: true\n    }),\n    ...\n  ]\n  ...\n}\n```\n\n`uipx` 作为一个调试模块，注定了需要在发布前把它去掉，为了避免人为操作失误而影响线上功能，这里建议配置如下：\n\n`package.json` 文件配置：\n\n```json\nscripts: {\n  \"dev\": \"webpack -w --debug\",\n  \"prod\": \"webpack -p\"\n}\n```\n\n`webpack.conf.js` 配置：\n\n```js\n// 引入插件\nvar UIPXPlugin = require('uipx-webpack-plugin'); \n\n// 接收运行参数\nconst argv = require('yargs')\n  .describe('debug', 'debug 环境') // use 'webpack --debug'\n  .argv;\n\nmodule.exports = {\n  ...\n\n  plugins: [\n    new UIPXPlugin({enable: !!argv.debug}),\n    ...\n  ]\n  ...\n}\n```\n\n这样，在开发的时候运行 `npm run dev`，发布的时候运行 `npm run prod` 即可。\n\n`webpack-dev-server` 的配套用法：\n\n用法其实跟上面一样，只是别忘记在启动脚本的时候增加 `--debug` 即可。如下：\n\n```js\n// package.json\n\"scripts\": {\n  ...\n  \"start:dev\": \"webpack-dev-server --debug\",\n  ...\n},\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccforgit%2Fuipx-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccforgit%2Fuipx-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccforgit%2Fuipx-webpack-plugin/lists"}