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

@dimina-kit/devtools

v0.5.0

Published

Dimina DevTools - modular developer tools for mini app debugging

Readme

@dimina-kit/devtools

Dimina DevTools 是调试 Dimina 小程序的桌面工具。它把小程序模拟器、Chrome DevTools、WXML、AppData、Storage、编译日志和 VS Code 工作台放在同一个 Electron 应用中。

Dimina DevTools

获取和运行

直接使用桌面应用,可以从项目的 Releases 下载已发布的桌面构建。要从源码运行,请先按仓库根 README准备仓库,然后执行:

pnpm --filter @dimina-kit/devtools build
pnpm --filter @dimina-kit/devtools start

作为 Electron 库使用

@dimina-kit/devtools 也可以作为 Electron 应用的基础包,用于替换品牌、编译后端、项目来源,或注册宿主自己的小程序 API 和模拟器界面。

pnpm add @dimina-kit/devtools electron@^43.2.0

当前包声明的 Electron peer 版本为 ^43.2.0。

最小入口是 launch(config?):

import { launch } from '@dimina-kit/devtools'

launch().catch((err) => {
  console.error(err)
  process.exit(1)
})

别在 main 模块顶层 await launch():它内部等 app.whenReady(),而 Electron 要等 main 模块求值完成才触发 ready,顶层 await 会死锁。

带宿主配置的最小形状:

import { launch } from '@dimina-kit/devtools'

launch({
  appName: 'My Miniapp Studio',
  adapter: myCompilationAdapter,
  onSetup(instance) {
    instance.registerSimulatorApi('login', params => login(params))
  },
}).catch((err) => {
  console.error(err)
  process.exit(1)
})

配置字段、CompilationAdapter、项目 Provider、preload、模拟器 UI、host toolbar 和公共导出已经移到库集成参考。

先读哪些文档

| 目标 | 文档 | | --- | --- | | 把 devtools 嵌入自己的 Electron 应用 | 库集成参考 | | 了解目录、构建、调试和安全边界 | 贡献者指南 | | 了解窗口、WebContentsView、IPC 和生命周期 | Electron Container 架构 | | 了解模拟器与页面 render host | 模拟器渲染架构 | | 了解 Chrome DevTools 的 Console、Network、Elements 和源码跳转 | DevTools CDP 路由 | | 了解内置 VS Code 工作台 | 编辑器集成 | | 了解项目窗口的 dock、分屏和原生视图定位 | 项目窗口布局 与 视图 Placement 对账 | | 了解页面栈或 TabBar | 页面栈 与 TabBar |

在仓库中开发

pnpm --filter @dimina-kit/devtools build
pnpm --filter @dimina-kit/devtools dev
pnpm --filter @dimina-kit/devtools check-types
pnpm --filter @dimina-kit/devtools test
pnpm --filter @dimina-kit/devtools test:e2e

dev 会先完整构建,再启动 renderer、simulator、主进程和 preload 的监听任务,最后打开 Electron。

安全提醒

devtools 面向本地开发。不要在它的窗口或宿主扩展中加载不受信任的远程内容。自定义 IPC 应通过 onSetup(instance) 提供的 instance.ipc 注册;宿主自己创建的窗口还要先调用 instance.registerTrustedWindow(win)。更完整的边界见贡献者指南。

License

MIT