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

@ks-dbdev/template-field-plugin

v1.0.2

Published

字段插件开发模板合集 - 包含公式类和API类模板

Readme

@ks-dbdev/template-field-plugin

字段插件开发模板合集,包含多种字段插件类型的开发模板。

npm version license

📦 包含模板

1. 公式类字段插件 (Formula)

位于 templates/formula/,用于创建自定义公式字段。

特点

  • ✅ 支持复杂公式逻辑
  • ✅ 多字段联动计算
  • ✅ 完整的UI配置支持
  • ✅ 多语言支持(中/英/日)

示例:平均分计算、加权求和、条件计算等

2. API类字段插件 (API)

位于 templates/api/,用于创建调用外部API的字段。

特点

  • ✅ Python环境支持
  • ✅ HTTP请求封装
  • ✅ 标准返回格式
  • ✅ 异步处理能力

示例:HTTP测试、数据获取、第三方服务集成等

🚀 快速开始

使用 CLI 创建项目(推荐)

# 使用 dbdev CLI 工具
npx @ks-dbdev/cli create template

# 或全局安装后使用
npm install -g @ks-dbdev/cli
dbdev create template

选择 "字段插件" → 选择 "公式类""API类"

📁 项目结构

@ks-dbdev/template-field-plugin/
├── package.json
├── README.md
└── templates/
    ├── formula/              # 公式类模板
    │   ├── src/
    │   │   ├── assets/
    │   │   │   └── icon.svg
    │   │   └── meta.json    # 配置文件
    │   ├── scripts/
    │   │   └── build.js     # 打包脚本
    │   ├── package.json
    │   └── README.md
    │
    └── api/                 # API类模板
        ├── src/
        │   ├── assets/
        │   │   └── icon_bda25b14.svg
        │   ├── meta.json    # 配置文件
        │   └── main.py      # Python入口
        ├── scripts/
        │   └── build.js     # 打包脚本
        ├── package.json
        └── README.md

🛠️ 开发流程

公式类插件开发

  1. 安装依赖

    cd your-project
    npm install
  2. 编辑配置

    # 修改 src/meta.json
    # - 设置字段名称、图标
    # - 配置公式模板
    # - 定义UI交互
  3. 打包发布

    npm run build
    # 生成 dist/plugin.zip

API类插件开发

  1. 安装依赖

    cd your-project
    npm install
  2. 编辑配置和代码

    # 修改 src/meta.json - 配置字段
    # 修改 src/main.py - 实现API逻辑
  3. 打包发布

    npm run build
    # 生成 dist/plugin.zip

📚 文档链接