From 1569099dd00460954ea3804f8e809ad1a198f240 Mon Sep 17 00:00:00 2001 From: tact-software Date: Thu, 26 Mar 2026 16:05:50 +0900 Subject: [PATCH] Fix Mermaid dependency descriptions across docs - Remove npm:@mermaid-js/mermaid-cli from mise.toml (mermaid is managed by `mdskim setup`, not mise) - Remove stale mmdc/mathjax/puppeteer checks from mise deps task - Correct README: all Node.js libs installed via `mdskim setup` to ~/.local/share/mdskim, not via mise - puppeteer-core and Chrome are needed for Mermaid rendering too, not just PDF export - Add mise install instructions to both READMEs - Fix leftover Japanese in English README - Update CLAUDE.md tech stack Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 2 +- README.en.md | 29 ++++++++++++++++++++--------- README.md | 13 ++++++------- mise.toml | 4 ---- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index e4adc61..6c3ee6b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,7 +14,7 @@ Terminal-based Markdown viewer with Vim-like navigation and Mermaid support. - clap, anyhow, crossterm, ratatui, pulldown-cmark, syntect, serde, toml - ratatui-image, image (inline terminal images) -- mermaid-cli (external, via mise) +- mermaid, puppeteer-core, mathjax-full (Node.js, via `mdskim setup`) ## Config diff --git a/README.en.md b/README.en.md index 568d56a..21fd268 100644 --- a/README.en.md +++ b/README.en.md @@ -18,6 +18,18 @@ Terminal-based Markdown viewer with Vim-like navigation, Mermaid diagrams, and m ## Install +### mise (recommended) + +```bash +# Latest version +mise use -g github:tact-software/mdskim + +# Specific version +mise use -g github:tact-software/mdskim@0.1.0 +``` + +### Build from source + ```bash git clone https://github.com/tact-software/mdskim.git cd mdskim @@ -33,13 +45,12 @@ cp target/release/mdskim ~/.local/bin/ ### Requirements -- **Rust** (1.85+) -- **Node.js** — Required for Mermaid, math rendering, and PDF export -- **mise** — Task runner -- **mmdc** (`npm:@mermaid-js/mermaid-cli`) — Mermaid rendering (auto-installed via `mise install`) -- **mathjax-full** — Math rendering (auto-installed via `mise run setup`) -- **puppeteer-core** — PDF export (auto-installed via `mise run setup`) -- **Google Chrome / Chromium** — Required for PDF export (uses system-installed browser) +- **Rust** (1.90+) +- **Node.js** (22+) — Required for Mermaid, math rendering, and PDF export +- **mise** — Tool manager and task runner +- **Google Chrome / Chromium** — Required for Mermaid rendering and PDF export (uses system-installed browser) + +Node.js libraries (mermaid, mathjax-full, puppeteer-core) are automatically installed to `~/.local/share/mdskim/` via `mdskim setup`. ## Usage @@ -60,10 +71,10 @@ mdskim doc.md --export-pdf output.pdf # Light theme mdskim doc.md --theme light -# 高速モード(Mermaid/Math レンダリングをスキップ) +# Fast mode (skip Mermaid/Math rendering) mdskim doc.md --render-mode fast -# Docker内でPDF出力 +# PDF export in Docker mdskim doc.md --export-pdf out.pdf --no-sandbox ``` diff --git a/README.md b/README.md index 27f72b7..9e31af9 100644 --- a/README.md +++ b/README.md @@ -45,13 +45,12 @@ cp target/release/mdskim ~/.local/bin/ ### 必要なもの -- **Rust** (1.85+) -- **Node.js** — Mermaid、数式レンダリング、PDF エクスポートに必要 -- **mise** — タスクランナー -- **mmdc** (`npm:@mermaid-js/mermaid-cli`) — Mermaid レンダリング(`mise install` で自動導入) -- **mathjax-full** — 数式レンダリング(`mise run setup` で自動導入) -- **puppeteer-core** — PDF エクスポート(`mise run setup` で自動導入) -- **Google Chrome / Chromium** — PDF エクスポートに必要(システムにインストール済みのものを使用) +- **Rust** (1.90+) +- **Node.js** (22+) — Mermaid、数式レンダリング、PDF エクスポートに必要 +- **mise** — ツール管理・タスクランナー +- **Google Chrome / Chromium** — Mermaid レンダリング・PDF エクスポートに必要(システムにインストール済みのものを使用) + +Node.js ライブラリ(mermaid, mathjax-full, puppeteer-core)は `mdskim setup` で `~/.local/share/mdskim/` に自動インストールされます。 ## 使い方 diff --git a/mise.toml b/mise.toml index adc9ee8..94bbf19 100644 --- a/mise.toml +++ b/mise.toml @@ -1,15 +1,11 @@ [tools] rust = "1.90" node = "22" -"npm:@mermaid-js/mermaid-cli" = "11" [tasks.deps] run = """ echo 'Checking dependencies...' cargo --version || { echo 'ERROR: cargo not found'; exit 1; } -mmdc --version > /dev/null 2>&1 || echo 'WARN: mmdc not found. Mermaid rendering disabled. Run: mise install' -node -e "require('mathjax-full/js/mathjax.js')" > /dev/null 2>&1 || echo 'WARN: mathjax-full not found. Math rendering disabled. Run: mise run setup' -node -e "require('puppeteer-core')" > /dev/null 2>&1 || echo 'WARN: puppeteer-core not found. PDF export disabled. Run: mise run setup' echo 'Dependencies checked.' """ description = "Check required dependencies"