
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@xm-fe/xm-h5-exposure
Advanced tools
2023 鲜沐科技 h5 曝光埋点
npm i @xm-fe/xm-h5-exposure
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
FAQs
鲜沐h5曝光埋点
We found that @xm-fe/xm-h5-exposure demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.