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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@weapp-tailwindcss/runtime

v0.1.3

Published

Shared runtime helpers (transformers, clsx wrappers, metadata) for weapp-tailwindcss 在小程序运行时的适配层。

Readme

@weapp-tailwindcss/runtime

@weapp-tailwindcss/runtime 提供了一套在小程序环境中运行 Tailwind 相关工具时所需的“公共层”——包含统一的 escape/unescape 转换器、clsx 封装、weappTwIgnore、以及帮助将这些能力注入第三方库的 createRuntimeFactory

  • 📦 面向 tailwind-merge/tailwind-variants/cva 等运行时库的公共依赖
  • 🔁 自动共享 escape 映射,避免多处维护
  • 🧩 暴露 weappTwIgnoreString.raw 包装),供第三方消费

安装

pnpm add @weapp-tailwindcss/runtime

快速上手

import { createRuntimeFactory } from '@weapp-tailwindcss/runtime'
import { createTailwindMerge, extendTailwindMerge, twJoin, twMerge } from 'tailwind-merge'

const create = createRuntimeFactory({
  createTailwindMerge,
  extendTailwindMerge,
  twJoin,
  twMerge,
})

const runtime = create()

runtime.twMerge('text-[#ececec]', 'text-[#ECECEC]') // => 自动 escape 的结果

自定义 escape/unescape

import { createRuntimeFactory } from '@weapp-tailwindcss/runtime'
import { createTailwindMerge } from 'tailwind-merge'

const create = createRuntimeFactory({
  createTailwindMerge,
  extendTailwindMerge,
  twJoin,
  twMerge,
})

const custom = create({
  escape: false, // 关闭最终 escape,适合 Web SSR
  unescape: {
    map: { '#': '__hash__' },
  },
})

其他导出

  • resolveTransformers:仅想复用 escape/unescape 时可以直接调用
  • clsx / ClsxFn / ClassValue:再导出一次,避免子包重复安装 clsx
  • weappTwIgnore:模板字符串标签,是 String.raw 的别名,方便外部包跳过 weapp 转义

更多细节见官方文档:https://tw.icebreaker.top/docs/community/merge/runtime-api