npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cxkit/version-vanilla

v0.0.6

Published

Vanilla JS adapter for @cxkit/version-core with built-in DOM UI.

Readme

@cxkit/version-vanilla

为 jQuery、传统服务端渲染模板页面(JSP/PHP/Thymeleaf)、或未引入 React/Vue 等重型抽象库的原生网页开发的微前端/原生级版本热更插件。

这不仅是适配层,也是整个体系架构中最接近浏览器的纯净 DOM 实现版本。底层使用 document.createElement 与原生 CSS 解析事件。

安装

npm install @cxkit/version-vanilla

快速入口用法

它的调用极其简单粗暴,你只需要把它插入到任意 script、文件最上方,或者甚至是通过打包工具单独塞进去的一个 chunk 即可,它会自动附加在 body 最末端。

import { mountVersionUpdateUI } from '@cxkit/version-vanilla'
// 你只需要自行引入 CSS(内部支持按需渲染逻辑,不打包 CSS string)
import '@cxkit/version-vanilla/style.css' 

mountVersionUpdateUI({
  // core 底层共享属性:
  pollInterval: 1000 * 60 * 5,
  devMock: false,
  
  // 原生适配器独享 UI 属性:
  title: '发现新版本',
  message: '我们已向生产服务器发布新的内容代码,由于浏览器存在缓存机制,建议点击立即更新。',
  confirmText: '刷新内容',
  cancelText: '取消',
  
  // 当 UI 卡片被生成并插入的回调
  onMounted: () => console.log('UI injected')
})

阅读完整文档

详细接入流程请访问 官方开发文档