{"id":13398654,"url":"https://github.com/AlloyTeam/AlloyLever","last_synced_at":"2025-03-14T02:31:29.990Z","repository":{"id":57176691,"uuid":"58345394","full_name":"AlloyTeam/AlloyLever","owner":"AlloyTeam","description":"1kb js library contains development debugging, error monitoring and reporting, user problem localization features - 1KB代码搞定开发调试发布，错误监控上报，用户问题定位","archived":false,"fork":false,"pushed_at":"2018-08-02T06:51:04.000Z","size":652,"stargazers_count":1384,"open_issues_count":17,"forks_count":168,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-03-01T09:11:19.241Z","etag":null,"topics":["alloylever","badjs","error","vconsole"],"latest_commit_sha":null,"homepage":"https://alloyteam.github.io/AlloyLever/","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/AlloyTeam.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":"2016-05-09T03:17:27.000Z","updated_at":"2024-11-04T02:42:43.000Z","dependencies_parsed_at":"2022-09-04T09:32:58.427Z","dependency_job_id":null,"html_url":"https://github.com/AlloyTeam/AlloyLever","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlloyTeam%2FAlloyLever","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlloyTeam%2FAlloyLever/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlloyTeam%2FAlloyLever/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlloyTeam%2FAlloyLever/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlloyTeam","download_url":"https://codeload.github.com/AlloyTeam/AlloyLever/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242859141,"owners_count":20196919,"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":["alloylever","badjs","error","vconsole"],"created_at":"2024-07-30T19:00:30.115Z","updated_at":"2025-03-14T02:31:29.967Z","avatar_url":"https://github.com/AlloyTeam.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","2. JavaScript 框架汇总","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"#### 中文 | [English](https://github.com/AlloyTeam/AlloyLever#english--中文)\n\n## AlloyLever \n\n**1kb**(gzip)代码搞定开发调试发布，错误监控上报，用户问题定位。\n\n* 支持错误监控和上报\n* 支持 [vConsole](https://github.com/WechatFE/vConsole)错误展示\n* 支持开发阶段使用 [vConsole](https://github.com/WechatFE/vConsole)\n* 支持生产环境机关拉取 [vConsole](https://github.com/WechatFE/vConsole)\n* 支持预埋机关唤起\n* 支持url带参数唤起\n\nurl带参数唤起有两个目的，第一是方便网站开发过程中显示vConsole面板，第二是发给投诉反馈网站错误的用户显示vConsole面板用于定位错误。\n\n## 安装\n\n```\nnpm install alloylever\n```\n\nCDN地址下载下来使用:\n\n[https://unpkg.com/alloylever](https://unpkg.com/alloylever)\n\n## 使用指南\n\n```js\nAlloyLever.config({\n    cdn:'//s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js',  //vconsole的CDN地址\n    reportUrl: \"//a.qq.com\",  //错误上报地址\n    reportPrefix: 'qun',    //错误上报msg前缀，一般用于标识业务类型\n    reportKey: 'msg',        //错误上报msg前缀的key，用户上报系统接收存储msg\n    otherReport: {              //需要上报的其他信息\n        uin: 491862102\n    },\n    entry:\"#entry\"          //请点击这个DOM元素6次召唤vConsole。//你可以通过AlloyLever.entry('#entry2')设置多个机关入口召唤神龙\n})\n```\n\nAlloyLever会监听`window.onerror`并把错误信息保存下来，并且上报到reportUrl，你也可以召唤到vConsole并显示出来错误和相关日志。\n或者使用这个CDN也可以:[//pub.idqqimg.com/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js](//pub.idqqimg.com/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js)\n\n## url唤起vConsole\n\n只要你的页面引用了AlloyLever，你只需要在你的url里带上 vconsole=show 就能显示vConsole面板。如:\n\n```\n//加载并显示log面板\nhttp://localhost:63342/AlloyLever/index.html?vconsole=show\n//加载但不显示log面板\nhttp://localhost:63342/AlloyLever/index.html?vconsole=hide\n//不加载vConsole脚本\nhttp://localhost:63342/AlloyLever/index.html\n```\n\n这些url的作用很好理解:\n\n* 开发阶段用于调试\n* 发给投诉的用户打开带有vconsole=show的url\n\n## 在线演示\n\n* [https://alloyteam.github.io/AlloyLever/](https://alloyteam.github.io/AlloyLever/cn.html)\n* [https://alloyteam.github.io/AlloyLever/?vconsole=show](https://alloyteam.github.io/AlloyLever/cn.html?vconsole=show)\n* [https://alloyteam.github.io/AlloyLever/?vconsole=hide](https://alloyteam.github.io/AlloyLever/cn.html?vconsole=hide)\n\n## QQ交流群491862102\n\n![](http://images2015.cnblogs.com/blog/105416/201706/105416-20170608111929012-1329379940.png)\n\n#### English | [﻿中文](https://github.com/AlloyTeam/AlloyLever#中文--english)\n\n## AlloyLever \n\n**1kb(gzip)** js library contains development debugging, error monitoring and reporting, user problem localization features.\n\n* support error monitoring and reporting\n* support for [vConsole](https://github.com/WechatFE/vConsole) error display\n* support the development phase by using [vConsole](https://github.com/WechatFE/vConsole)\n* support the production environment authorities to pull [vConsole](https://github.com/WechatFE/vConsole)\n* support DOM evokes vConsole\n* supports url evokes vConsole\n\nThere are two purposes for URL parameter arousal, the first is to display the vConsole panel during the website development process, and the second is to send a complaint to the feedback site. The wrong user displays the vConsole panel for locating errors.\n\n## Install\n\n```\nnpm install alloylever\n```\n\nor get it from cdn:\n\n[https://unpkg.com/alloylever](https://unpkg.com/alloylever)\n\n## Usage\n\n```js\nAlloyLever.config({\n    cdn:'//s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js',  //vconsole CDN address\n    reportUrl: \"//a.qq.com\",  //Error reporting address\n    reportPrefix: 'qun',    //An error reporting msg prefix is generally used to differentiate business types\n    reportKey: 'msg',        //Error reporting msg prefix key, user reporting system receives storage msg\n    otherReport: {              //Other information to be reported\n        uin: 491862102\n    },\n    entry:\"#entry\"          //Please click on this DOM element to summon vConsole 6 times. You can use AlloyLever.entry('#entry2') add more entry\n})\n```\n\nAlloyLever will listen to `window.onerror` and save the error information, and report to reportUrl, you can also call vConsole and display errors and related logs.\n\n## URL evokes vConsole\n\nAs long as your page references AlloyLever, you simply display the vConsole panel with the vconsole=show in your url. Such as:\n\n```\n//load and display the log panel\nhttp://localhost:63342/AlloyLever/index.html?vconsole=show\n//load but don't display the log panel\nhttp://localhost:63342/AlloyLever/index.html?vconsole=hide\n//don't load vConsole\nhttp://localhost:63342/AlloyLever/index.html\n```\n\nThe role of these URL is well understood:\n\n* development phase for debugging\n* open the URL with vconsole=show to the user who has complained\n\n## DEMO\n\n* [https://alloyteam.github.io/AlloyLever/](https://alloyteam.github.io/AlloyLever/)\n* [https://alloyteam.github.io/AlloyLever/?vconsole=show](https://alloyteam.github.io/AlloyLever/?vconsole=show)\n* [https://alloyteam.github.io/AlloyLever/?vconsole=hide](https://alloyteam.github.io/AlloyLever/?vconsole=hide)\n\n# License\nThis content is released under the [MIT](http://opensource.org/licenses/MIT) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlloyTeam%2FAlloyLever","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlloyTeam%2FAlloyLever","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlloyTeam%2FAlloyLever/lists"}