Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xm-fe/xm-h5-exposure

Package Overview
Dependencies
Maintainers
7
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xm-fe/xm-h5-exposure

鲜沐h5曝光埋点

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

⚡️ 简介

2023 鲜沐科技 h5 曝光埋点

🚀 使用

npm i @xm-fe/xm-h5-exposure

0.0.3

  • feat: bid 字段更新

0.0.2

  • fix: 修复 pageName 重复调用问题

0.0.1

  • feat: 新增 exposure 类,支持 h5 曝光埋点功能
import { Exposure } from '@xm-fe/xm-base'
// exp就是那个全局唯一的实例
const exp = new Exposure()

// vue封装一个指令,每个使用了该指令的dom都会自动add自身进观察者中
Vue.directive('exp-dot', {
  bind(el, binding, vnode) {
    // 优先上报绑定元素的 data-xm 的数据,如果没有使用 data-xmv
    //  data-xm格式为 key:value,key:value,...
    exp.bind(el)
  },
  unbind(el) {
    exp.unbind(el)
  },
})

🚀 开发


# 安装依赖
npm i
# 发布流程

# 编译
npm run build

# 第一次登录
npm login

# 发布(发布前修改版号)
npm publish --tag

# 配置npm全局使用淘宝镜像源
npm config set registry https://registry.npm.taobao.org
# 配置npm全局恢复官方镜像源
npm config set registry https://registry.npmjs.org

# 本项目
npm link

# 引用调试的项目
npm link 包名

# 取消关联
npm unlink 包名

# 查看
npm ls -g

Keywords

FAQs

Package last updated on 25 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc