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

xcjt-cmt

v1.0.1

Published

uniapp小程通用组件库 - 支持Vue2/Vue3的uniapp通用组件包

Readme

xcjt-cmt

小程通用组件库 - 支持Vue2/Vue3的uniapp通用组件包

特性

  • 🚀 支持 Vue 2 和 Vue 3
  • 📱 专为 uniapp 开发优化
  • 🛠️ TypeScript 支持
  • 📦 支持按需引入
  • 🔧 Vite 构建,体积小巧
  • 📚 完整的类型定义

安装

# 使用 npm
npm install xcjt-cmt

# 使用 yarn
yarn add xcjt-cmt

# 使用 pnpm
pnpm add xcjt-cmt

使用方法

完整引入

import XcjtCmt from 'xcjt-cmt'

// 初始化(可选)
XcjtCmt.install()

按需引入

// 引入日志模块
import { xcjtLog } from 'xcjt-cmt/log'

// 或者
import xcjtLog from 'xcjt-cmt/log'

// 使用
xcjtLog() // 输出: [2024-01-01 12:00:00] [XCJT] [INFO] hello xcjt-cmt
xcjtLog('自定义消息') // 输出: [2024-01-01 12:00:00] [XCJT] [INFO] 自定义消息

API 文档

日志模块 (xcjt-cmt/log)

xcjtLog(message?, level?)

主要的日志函数

参数:

  • message (string, 可选): 日志消息,默认为 'hello xcjt-cmt'
  • level (LogLevel, 可选): 日志级别,默认为 'info'

示例:

import { xcjtLog, LogLevel } from 'xcjt-cmt/log'

xcjtLog() // 默认消息
xcjtLog('调试信息', LogLevel.DEBUG)
xcjtLog('警告信息', LogLevel.WARN)
xcjtLog('错误信息', LogLevel.ERROR)

便捷方法

import { log } from 'xcjt-cmt/log'

log.debug('调试信息')
log.info('普通信息')
log.warn('警告信息')
log.error('错误信息')

配置

import { setLogConfig, getLogConfig, resetLogConfig } from 'xcjt-cmt/log'

// 设置配置
setLogConfig({
  prefix: '[我的应用]',
  timestamp: false,
  level: LogLevel.DEBUG
})

// 获取当前配置
const config = getLogConfig()

// 重置为默认配置
resetLogConfig()

日志级别

import { LogLevel } from 'xcjt-cmt/log'

// 可用级别
LogLevel.DEBUG   // 'debug'
LogLevel.INFO    // 'info'
LogLevel.WARN    // 'warn'
LogLevel.ERROR   // 'error'

开发

# 安装依赖
pnpm install

# 开发模式
pnpm dev

# 构建
pnpm build

# 类型检查
pnpm type-check

# 代码检查
pnpm lint

构建产物

构建后会生成以下文件:

dist/
├── index.js          # CommonJS 格式主入口
├── index.esm.js      # ES Module 格式主入口
├── index.d.ts        # TypeScript 类型定义
├── log/
│   ├── index.js      # CommonJS 格式日志模块
│   ├── index.esm.js  # ES Module 格式日志模块
│   └── index.d.ts    # TypeScript 类型定义

兼容性

  • Vue 2.6+
  • Vue 3.0+
  • uniapp
  • 现代浏览器
  • 小程序环境

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

更新日志

1.0.0

  • 🎉 初始版本发布
  • ✨ 添加日志模块
  • 🛠️ 支持 Vue2/Vue3
  • 📦 支持按需引入