
jeroen 发布 Mithril.js 分支版本,加入 signals、SSR 和 store
来源标题:Mithril.js with signals, state, SSR and a store
开发者 jeroen 发布了 Mithril.js 的 Garage44 分支版本,从 bitstillery/mithril 分叉而来,新增 signals、状态管理、SSR 和 store 功能。仓库包含 4,145 次提交和 6 个分支,代码以 TypeScript 为主,占比 94.3%。
以下正文由 AI 翻译自 Hacker News 最新(原文版权归原站所有),可能存在偏差,重要内容请以原文为准。
Mithril, Garage44 版 —— 带 signals、state、SSR 和 store 的 Mithril.js。Fork 自 bitstillery/mithril。
4,145 次提交 6 个分支 0 个标签 13 MiB TypeScript 94.3% CSS 5.1% HTML 0.6%
main 查找文件
HTTPS 下载 ZIP 下载 TAR.GZ 下载 BUNDLE 用 VS Code 打开 用 VSCodium 打开 用 Intellij IDEA 打开
精确 精确 并集 正则
仓库文件(最新提交在前) 文件名 最新提交信息 最新提交日期
viberfox-agent 5ef10eb3dd 所有检查均通过 Test / test (push) 19 秒内通过 详情 合并拉取请求 'feat: component library, validation and Shell layout'(#2),从 feat/components 合并到 main 2026-10-09 17:47:23 +00:00
.github/workflows chore: 移除遗留的上游配置与编辑器配置 2026-10-07 11:48:24 +02:00
.zed chore: 移除遗留的上游配置与编辑器配置 2026-10-07 11:48:24 +02:00
bench perf(state): 按位置跟踪组件的 signal 读取 2026-10-07 16:54:57 +02:00
docs feat(components): 添加带导航、主区域和上下文面板的 Shell 布局 2026-10-09 15:39:58 +00:00
examples feat(components): 添加带导航、主区域和上下文面板的 Shell 布局 2026-10-09 15:39:58 +00:00
scripts fix(release): 发布前检查 npm 登录状态 2026-03-11 17:36:01 +01:00
src feat(components): 添加带导航、主区域和上下文面板的 Shell 布局 2026-10-09 15:39:58 +00:00
tests feat(components): 添加带导航、主区域和上下文面板的 Shell 布局 2026-10-09 15:39:58 +00:00
.gitattributes chore: 移除遗留的上游配置与编辑器配置 2026-10-07 11:48:24 +02:00
.gitignore feat(components): 添加带浅色和深色主题的组件库 2026-10-09 11:32:56 +00:00
.npmignore refactor: 将库移入 src/ 并按区域分组 2026-10-07 11:27:51 +02:00
.oxfmtrc.json chore: 重新格式化 2026-02-19 11:45:49 +01:00
.oxlintrc.json chore: 移除遗留的上游配置与编辑器配置 2026-10-07 11:48:24 +02:00
.versionrc.json build(release): 在发布提交前格式化发布文件 2026-09-29 16:10:12 +02:00
bun.lock chore: 重命名为 Mithril, Garage44 版 2026-10-08 18:35:33 +00:00
bunfig.toml refactor: 将库移入 src/ 并按区域分组 2026-10-07 11:27:51 +02:00
CHANGELOG.md chore(release): 3.12.2 2026-10-07 16:58:35 +02:00
CLAUDE.md chore: 重命名为 Mithril, Garage44 版 2026-10-08 18:35:33 +00:00
LICENSE chore: 重命名为 Mithril, Garage44 版 2026-10-08 18:35:33 +00:00
package.json feat(validation): 添加可链式模型校验,并在字段上添加 validation 属性 2026-10-09 11:45:32 +00:00
README.md feat(components): 添加带浅色和深色主题的组件库 2026-10-09 11:32:56 +00:00
tsconfig.json chore: 移除遗留的上游配置与编辑器配置 2026-10-07 11:48:24 +02:00
README.md Mithril, Garage44 版
带 signals、响应式 state、服务端渲染和持久化 store 的 Mithril.js。严格 TypeScript,使用 Bun 开发。
这是 Bitstillery 版本的 fork,供 Garage44 的项目使用。它不发布到 npm;请通过 git URL 依赖它。
Mithril v2 应用可以原样运行,除了 m.request 和 streams:改用 fetch()。
import m, {state} from '@garage44/mithril' const $s = state({count: 0}) m.mount(document.body, { view: () => <button onclick={() => $s.count++}>已点击 {$s.count} 次</button>, })
快速开始
bun add @garage44/mithril@git+https://code.garage44.eu/jeroen/mithril.git
指南:setup、signals、state、SSR、store;docs/site/content/ 中的其余内容涵盖 Mithril 核心。示例应用:examples/state/、examples/ssr/,以及组件库的沙箱 examples/components/。
bun install bun test # 测试 bun run lint # 格式化、lint、类型检查 bun run bench # 基准测试;bench:render 等针对单一主题
许可证
MIT —— 见 LICENSE。Mithril 由 Leo Horie 创建;感谢所有 Mithril.js 贡献者。
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。