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

@talex-touch/unplugin-export-plugin

v1.2.16

Published

Export unplugin for talex-touch

Readme

TalexTouch # PluginExporter

📦 TuffCLI: 本包现已集成到 TuffCLI 工具链中,通过 tuff 命令进行插件的构建、发布和管理。

tuff dev      # 启动开发服务器
tuff build    # 构建并打包插件
tuff publish  # 发布插件包

NPM version

Export unplugin for talex-touch.

Install

npm i @talex-touch/unplugin-export-plugin

Next in your vite.config.js or vite.config.ts

Vite

import TouchPluginExport from '@talex-touch/unplugin-export-plugin/vite'

export default defineConfig({
  plugins: [
    ....,
    TouchPluginExport()
  ],
})

Description

Auto Generate Manifest

It will automatically generate a manifest.json when you build.

Auto Wrap Project -> Plugin

Generate a touch-plugin file on the build folder!

For more about it, see the source code.

Build Plugin Package

tuff build 会执行 Vite 构建并打包 .tpex。如果你已经手动完成了 Vite 构建,也可以使用 tuff builder 仅执行打包:

vite build && tuff builder
# or
vite-ssg build && tuff builder

You can also add a script in package.json:

{
  "scripts": {
    "build": "vite build && tuff builder"
  }
}

The CLI will read dist/ and generate dist/out and dist/build folders. The final .tpex file will be in dist/build/.

Extra commands:

tuff help   # show command list
tuff about  # tool info
 tuff login  # save auth token
 tuff logout # clear auth token

Your result can refer to this

dist/
  ├── out/                    # Vite build output
  │   ├── index.html
  │   ├── assets/
  │   └── *.js, *.css
  ├── build/                  # All content packed into tpex (keep)
  │   ├── index.html          # Copy from out
  │   ├── assets/             # out's assets + merged assets
  │   ├── *.js, *.css         # Copy from out
  │   ├── index.js            # Project root directory
  │   ├── widgets/            # Project root directory
  │   ├── preload.js          # Project root directory
  │   ├── README.md           # Project root directory
  │   ├── manifest.json       # Generated
  │   └── key.talex           # Generated
  └── xxx-1.0.0.tpex         # Final plugin package

Inspiration

Inspired by vite

Thanks

Thanks to @antfu's template

Contact

You could contact us through [email protected]

Index Folder Splitting (Prelude/Surface Separation)

支持将 index.js 拆分为 index/ 文件夹,实现 Prelude(先导脚本) 的模块化开发:

使用方式

  1. 创建 index/ 文件夹(与 manifest.json 同级)
  2. index/ 中创建入口文件:main.tsmain.jsindex.tsindex.js
  3. 在入口文件中导入其他模块并导出插件生命周期

示例结构

my-plugin/
├── manifest.json
├── index/                    # Prelude 脚本文件夹
│   ├── main.ts              # 入口文件(优先级:main.ts > main.js > index.ts > index.js)
│   ├── utils.ts             # 工具函数
│   ├── providers/           # 提供者模块
│   │   ├── google.ts
│   │   └── deepl.ts
│   └── types.ts             # 类型定义
├── src/                      # Surface UI 源码(Vue/React)
│   └── ...
└── package.json

构建行为

  • 开发模式index/ 文件夹实时编译为 index.js,支持热重载
  • 生产构建:使用 esbuild 将 index/ 打包为单个 index.js 文件
  • 别名支持@~ 指向 index/ 目录
  • 外部依赖electron 自动标记为 external

优势

  • 模块化开发:将复杂的 Prelude 脚本拆分为多个文件
  • TypeScript 支持:原生支持 .ts 文件
  • 热重载:开发时修改 index/ 内文件自动重新编译
  • 零配置:无需额外配置,自动检测并编译

注意事项

  • index/ 文件夹与根目录的 index.js 互斥,优先使用 index/ 文件夹
  • 编译后的 index.js 为 CommonJS 格式(format: 'cjs'
  • 目标环境:Node.js 18+(target: 'node18'

Intelligence Integration

  • 如果插件需要调用智能能力,可在打包时携带 @talex-touch/tuff-intelligence 配置文件或默认渠道(如 Tuff Nexus https://tuff.tagzxia.com/v1),由主应用加载。
  • 建议在插件内使用 utils 类型定义保持与核心一致,避免重复定义模型/能力/提示词结构。