cwj_monitoring 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +7 -1
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -18,6 +18,8 @@ npm run server
18
18
  2. 错误监控:js错误,资源加载错误,手动console.error抛出的错误,promise未捕获的错误
19
19
  3. 性能监控:FP、DCL、Load、FPS
20
20
 
21
+ 注:目前点击监控只支持button标签触发的点击事件
22
+
21
23
  ## 通过 npm 使用
22
24
 
23
25
  安装
@@ -33,9 +35,13 @@ import { init } from "cwj_monitoring";
33
35
 
34
36
  //使用 init 全局进行初始化
35
37
  init({
36
- url: "http://localhost:8080", //数据上传服务器地址
38
+ url: "http://localhost:8080", //必传参数,数据上传服务器地址
37
39
  max: 10, //可选参数,最大缓存数,即超过缓存数立即上传,默认为5
38
40
  time: 60000, //可选参数,最大缓存时间,即超过最大缓存时间立即上传,默认30s
41
+ error:false, //可选参数,是否监听错误事件,默认监听
42
+ click:false,//可选参数,是否监听点击事件,默认监听
43
+ performance:false,//可选参数,是否监听性能指标,默认监听
44
+ router:false, //可选参数,是否监听路由事件,默认监听
39
45
  });
40
46
 
41
47
  //无论vue的全局错误捕获,还是react的错误边界,都可使用window.$track.emit手动上传错误
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "cwj_monitoring",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "基于 JS 适用Web端的插件,为前端项目提供【 行为、性能、异常 】监控手段",
5
+ "repository": "https://github.com/cwjbjy/cwj_monitoring",
5
6
  "main": "dist",
6
7
  "module": "dist",
8
+ "types": "dist/index.d.ts",
7
9
  "scripts": {
8
10
  "build": "rollup -c",
9
11
  "serve": "rollup -c -w"