Skills Plugins MCP Prompt Model 博客 我的中心

bun-runtime

Bun 作为运行时、包管理器、打包器和测试运行器。何时选择 Bun 而非 Node、迁移注意事项以及 Vercel 支持。

DeepseekModel Curated skill Quality Excellent · 90 v1.0.0

Get

https://deepseekmodel.com/api/download.php?id=affaan-m-ecc-docs-zh-cn-skills-bun-runtime-skill-md&format=skill
Download .skill Standard format with system_prompt and model_config, ready for any agent framework
The actual content of the system_prompt field in the .skill file.
name bun-runtime description Bun 作为运行时、包管理器、打包器和测试运行器。何时选择 Bun 而非 Node、迁移注意事项以及 Vercel 支持。 origin ECC Bun 运行时 Bun 是一个快速的全能 JavaScript 运行时和工具集:运行时、包管理器、打包器和测试运行器。 何时使用 优先选择 Bun 用于:新的 JS/TS 项目、安装/运行速度很重要的脚本、使用 Bun 运行时的 Vercel 部署,以及当您想要单一工具链(运行 + 安装 + 测试 + 构建)时。 优先选择 Node 用于:最大的生态系统兼容性、假定使用 Node 的遗留工具,或者当某个依赖项存在已知的 Bun 问题时。 在以下情况下使用:采用 Bun、从 Node 迁移、编写或调试 Bun 脚本/测试,或在 Vercel 或其他平台上配置 Bun。 工作原理 运行时 :开箱即用的 Node 兼容运行时(基于 JavaScriptCore,用 Zig 实现)。 包管理器 : bun install 比 npm/yarn 快得多。在当前 Bun 中,锁文件默认为 bun.lock (文本);旧版本使用 bun.lockb (二进制)。 打包器 :用于应用程序和库的内置打包器和转译器。 测试运行器 :内置的 bun test ,具有类似 Jest 的 API。 从 Node 迁移 :将 node script.js 替换为 bun run script.js 或 bun script.js 。运行 bun install 代替 npm install ;大多数包都能工作。使用 bun run 来执行 npm 脚本;使用 bun x 进行 npx 风格的临时运行。支持 Node 内置模块;在存在 Bun API 的地方优先使用它们以获得更好的性能。 Vercel :在项目设置中将运行时设置为 Bun。构建命令: bun run build 或 bun build ./src/index.ts --outdir=dist 。安装命令: bun install --frozen-lockfile 用于可重复的部署。 示例 运行和安装 # Install dependencies (creates/updates bun.lock or bun.lockb) bun install # Run a script or file bun run dev bun run src/index.ts bun src/index.ts 脚本和环境变量 bun run --env-file=. env dev FOO=bar bun run script.ts 测试 bun test bun test --watch // test/example.test.ts import { expect, test } from "bun:test" ; test ( "add" , () => { expect ( 1 + 2 ). toBe ( 3 ); }); 运行时 API const file = Bun . file ( "package.json" ); const json = await file. json (); Bun . serve ({ port : 3000 , fetch ( req ) { return new Response ( "Hello" ); }, }); 最佳实践 提交锁文件( bun.lock 或 bun.lockb )以实现可重复的安装。 在脚本中优先使用 bun run 。对于 TypeScript,Bun 原生运行 .ts 。 保持依赖项最新;Bun 和生态系统发展迅速。
Keywords that activate this skill. Click one to copy it.

This skill does not provide trigger words.

The downloaded .skill package contains the following fields.
Field Description
formatFormat tag (skill/v1)
skill_idUnique skill ID
nameSkill name
versionVersion
descriptionDescription
categoryCategories (array)
trigger_wordsTrigger words
tagsTags
sourceSource
source_urlSource URL (this page)
exported_atExported at (set per download)
system_promptSystem prompt body
model_configModel config: provider / model / temperature / max_tokens / top_p
examplesExamples
install_guideImport guide for Coze / Dify / Claude / custom frameworks
The same skill can be exported in different platform formats.
.skill Standard format with system_prompt and model_config, ready for any agent framework Download
.skillpro Enhanced format with scripts, tools, dependencies and hooks Download
.json Plain JSON export with system_prompt and model parameters only Download
Coze Markdown with frontmatter, for Coze platform import Download
Dify Dify DSL, import directly after creating an app Download

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

验证码 --

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。