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

@kappan/migrate-review

v0.3.1

Published

Migrate a Re:VIEW project to a Kappan project (.re files, config.yml, catalog.yml, images)

Readme

@kappan/migrate-review

既存の Re:VIEW プロジェクトを Kappan プロジェクトに一括変換するツール。.re ファイル、config.ymlcatalog.yml、画像ディレクトリをまとめて変換し、kappan build がそのまま通る Kappan プロジェクトを出力する。

Installation

pnpm add -D @kappan/migrate-review

通常は @kappan/cli 経由で kappan migrate コマンドとして使う。

Usage

CLI

kappan migrate <source-dir> [--out <target>] [--dry-run] [--force]
  • <source-dir>:Re:VIEW プロジェクトのルートディレクトリ
  • --out, -o:出力先(省略時 <source>-kappan
  • --dry-run:ファイルを書き出さず、結果サマリだけ
  • --report-onlymigration-report.md のみ生成
  • --force:既存出力ディレクトリを上書き

Programmatic API

import { migrate } from '@kappan/migrate-review';

const result = await migrate({
  sourceDir: './my-review-book',
  outDir: './my-review-book-kappan',
  force: false,
});

console.log(`Converted ${result.filesConverted} chapters`);
console.log(`Unsupported notations: ${result.unsupported.length}`);

対応マッピング

config.yml → kappan.config.ts

| Re:VIEW | Kappan | | ------------------------- | ----------------------------------------- | | bookname | output.filename | | booktitle | metadata.title | | aut(文字列または配列) | metadata.creator[].name(role: 'aut') | | edt | role: 'edt' creator | | trl | role: 'trl' creator | | language | metadata.language(デフォルト 'ja') | | date | metadata.date | | publisher | metadata.publisher | | isbn | metadata.identifierurn:isbn: 形式) |

catalog.yml → front-matter next チェーン

PREDEFCHAPSAPPENDIXPOSTDEF の順序で章を連結し、各章 Markdown の front-matter に next を埋め込む。

記法変換

@kappan/plugin-review-compattransformReviewSource() を再利用。30 種類超の主要記法を Markdown / Kappan 拡張記法に変換する。詳細は plugin-review-compat の README を参照。

未対応記法の扱い

完全互換は目指さない。変換できない記法は次のように扱う。

  • インライン記法(@<bogus>{...} 等):<!-- REVIEW-UNSUPPORTED: ... --> として保存
  • ブロック記法(//unknown_block{...} 等):同上
  • config フィールド:migration-report.md に列挙

すべての未対応は変換後ディレクトリの migration-report.md で確認できる。

出力例

my-review-book-kappan/
├── kappan.config.ts             # config.yml から生成
├── migration-report.md          # 変換レポート
├── src/
│   ├── preface.md
│   ├── chap01.md                # front-matter で next 連結
│   ├── chap02.md
│   └── colophon.md
└── images/                      # 元 images/ ディレクトリのコピー
    └── *.png

制限事項

  • stylesheet のカスタム CSS は theme({ additionalCss }) へ転記(テーマで作り込む場合は別途調整)
  • 画像ファイル名の拡張子推定が失敗した場合は手動修正が必要
  • review-ext.rb などのカスタム拡張は未対応

License

MIT