mirror of
https://github.com/bruce2431/obsidian-chat-bubble-renderer.git
synced 2026-07-22 07:49:16 +00:00
- 检测 #聊天记录 标签自动识别 - 解析格式: [发送者] YYYY-MM-DD HH:MM:SS - 微信风格气泡: 对方浅灰 #f2f3f5 / 自己微信绿 #95ec69 - 引用回复灰色引用条、合并转发可展开卡片 - Obsidian ![[文件]] 内部链接转图片/音频/视频 - 全屏 fixed overlay,零触碰 Obsidian DOM - Ctrl+P 命令渲染,Esc/✕ 退出 - 基于 obsidianmd/obsidian-sample-plugin 模板
17 lines
758 B
JavaScript
17 lines
758 B
JavaScript
import { readFileSync, writeFileSync } from 'fs';
|
|
|
|
const targetVersion = process.env.npm_package_version;
|
|
|
|
// read minAppVersion from manifest.json and bump version to target version
|
|
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
|
|
const { minAppVersion } = manifest;
|
|
manifest.version = targetVersion;
|
|
writeFileSync('manifest.json', JSON.stringify(manifest, null, '\t'));
|
|
|
|
// update versions.json with target version and minAppVersion from manifest.json
|
|
// but only if the target version is not already in versions.json
|
|
const versions = JSON.parse(readFileSync('versions.json', 'utf8'));
|
|
if (!(targetVersion in versions)) {
|
|
versions[targetVersion] = minAppVersion;
|
|
writeFileSync('versions.json', JSON.stringify(versions, null, '\t'));
|
|
}
|