{"id":20345665,"url":"https://github.com/kscript/vue-config-wrapper","last_synced_at":"2026-05-13T12:49:46.923Z","repository":{"id":57395419,"uuid":"285768699","full_name":"kscript/vue-config-wrapper","owner":"kscript","description":"vue项目配置的包装器. 项目依赖更新时, 给出提示或直接修补配置","archived":false,"fork":false,"pushed_at":"2020-08-10T10:36:44.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T15:29:44.858Z","etag":null,"topics":["config","vue","vue-cli","wrapper"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kscript.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}},"created_at":"2020-08-07T07:39:02.000Z","updated_at":"2023-03-08T03:02:01.000Z","dependencies_parsed_at":"2022-09-02T15:30:31.181Z","dependency_job_id":null,"html_url":"https://github.com/kscript/vue-config-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kscript/vue-config-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kscript%2Fvue-config-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kscript%2Fvue-config-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kscript%2Fvue-config-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kscript%2Fvue-config-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kscript","download_url":"https://codeload.github.com/kscript/vue-config-wrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kscript%2Fvue-config-wrapper/sbom","scorecard":{"id":571233,"data":{"date":"2025-08-11","repo":{"name":"github.com/kscript/vue-config-wrapper","commit":"3ca94f47f3f9fd375eb53f8318f062f0973911cf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/3 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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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-20T16:24:27.318Z","repository_id":57395419,"created_at":"2025-08-20T16:24:27.318Z","updated_at":"2025-08-20T16:24:27.318Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32983700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T11:31:52.688Z","status":"ssl_error","status_checked_at":"2026-05-13T11:31:52.072Z","response_time":115,"last_error":"SSL_read: 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":["config","vue","vue-cli","wrapper"],"created_at":"2024-11-14T22:09:19.530Z","updated_at":"2026-05-13T12:49:46.797Z","avatar_url":"https://github.com/kscript.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## vue-config-wrapper\n一个vue项目配置的包装器.  \n当项目依赖的模块更换配置项时, 根据 项目已有配置 和 实际安装的版本, 给出提示或直接修补配置, 使开发者可以比较平滑地升级项目依赖, 获得更好的开发体验.\n\n\n## 支持的配置项\n- [x] sass\n\n## 开发说明\n我们可以在lib里基于vue.config.js里某个配置的变动, 建立一个对它进行适配的脚本, 比如项目创建最初的[sassLoader.js](./src/lib/sassLoader.js)  \n一个这样的脚本, 一般最少包含以下几种属性:  \n| 属性名 | 类型 | 描述 |\n| -- | -- | -- |\n| name | string | 标识名 |\n| path | string | 要操作的项在vue.config.js导出对象中的访问路径, 用.进行分级 |\n| type | string | 操作类型, option/module, option表示一般配置项, module表示模块配置项 |\n| changelog | object[] | 变动记录 |\n| handler | function | 操作方法 |\n  \n### changelog 规则\n``` javascript\n[{\n    // changelog是一个对象数组, 它的每一个元素都应当有一个版本号.\n    version: '8.0.0',\n    // utils 工具方法 updateConfig 里预定义了对 replace 属性的处理\n    // replace: {key: value} 如果是低版本向高版本升级\n    // 在 handler 方法的参数 itemConfig 里, 如果有相同key, 会被替换为value\n    // 如果是高版本向低版本降, 则是逆向操作\n    replace: {\n        data: 'prependData'\n    },\n    // 如果update不是函数, 或 是函数且返回值严格相等于true, 那么执行预定义的处理\n    \n    // itemConfig 是 handler 的参数\n    // item 即update函数所在的元素\n    // index 索引 reverseIndex 开始翻转的索引\n\n    // changelog会按版本从小到大进行一次排序, 然后依次与itemInfo.version比较\n    // 小于等于的按正常顺序, 大于的会被翻转(从大到小)\n    // changelog: [{version: 0},1,2,3,4,5] item.version: 3 实际遍历时的数组顺序 [0,1,2,3,5,4]\n    // index: 0,1,2,3,4,5 reverseIndex 4\n    update(itemConfig, item, index, reverseIndex) {\n        return true\n    }\n}]\n// 例如\n// 7.0.0 升 8.0.0 时, \n// 原来的itemConfig为 {data: '@/assets/scss/index.scss'}\n// 处理后itemConfig为 {prependData: '@/assets/scss/index.scss'}\n\n```\n\n### type 可选值\n- option: 只读取@vue/cli-service信息\n- module: 同时读取 @vue/cli-service 和 模块自身信息\n\n### handler 参数\n- itemConfig  根据path读取到的配置 (如果path指向一个非对象, 会被包装到一个对象里, 可以通过path最后一级地址访问它)\n- itemInfo  当前可用的信息. type为module时, 那么它是模块自身的信息, type为option时, 则是@vue/cli-service的信息\n- utils  提供的一些工具方法\n- moreInfo  type为module时, 会传入@vue/cli-service的信息, 否则就是{}\n\n## license\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkscript%2Fvue-config-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkscript%2Fvue-config-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkscript%2Fvue-config-wrapper/lists"}