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

reifier

v0.2.0

Published

Git branch build artifact diff tool

Readme

Reifier

Git 브랜치 간 빌드 결과물(artifact)을 비교하는 CLI 도구.

PR 리뷰 시 컴파일된 결과물의 변경사항을 시각적으로 확인할 수 있다.

설치

npm install -g reifier
# 또는
npx reifier

Quick Start

# 두 브랜치의 빌드 결과물 비교
npx reifier run ./my-repo --base main --head feature-branch -o diff.html

이 명령어는:

  1. main 브랜치로 전환 → 빌드 → 결과물 캡처
  2. feature-branch로 전환 → 빌드 → 결과물 캡처
  3. 두 결과물의 diff를 HTML로 생성

CLI 명령어

run - 전체 파이프라인

가장 일반적인 사용법. 두 브랜치를 비교하는 전체 과정을 한 번에 실행.

reifier run <repo> --base <branch> --head <branch> [options]

예시:

# 기본 사용
reifier run . --base main --head feature/new-ui

# 커스텀 빌드 명령어
reifier run . --base main --head develop --build "npm run build"

# JavaScript 파일만 비교
reifier run . --base main --head feature --pattern ".*\.js$"

# 결과를 파일로 저장
reifier run . --base main --head feature -o diff.html

# git push 생략 (로컬 테스트용)
reifier run . --base main --head feature --no-push

capture - 단일 브랜치 캡처

특정 브랜치의 빌드 결과물만 캡처. 이미 캡처된 브랜치가 있을 때 유용.

reifier capture <repo> <branch> [options]

예시:

reifier capture . main
reifier capture . feature-branch --build "yarn build"

diff - diff HTML 생성

이미 캡처된 두 브랜치의 결과물로 diff HTML 생성.

reifier diff <repo> <base> <head> [options]

예시:

reifier diff . main feature-branch -o diff.html

deploy - diff HTML 배포

생성된 diff HTML을 surge.sh에 배포하여 공유 링크 생성.

reifier deploy <html-file> [options]

예시:

# 랜덤 도메인으로 배포
reifier deploy diff.html

# 커스텀 도메인 지정
reifier deploy diff.html -d my-diff.surge.sh

옵션

| 옵션 | 설명 | 기본값 | |------|------|--------| | -b, --build <cmd> | 빌드 명령어 | yarn && yarn build | | -p, --pattern <regex> | 캡처할 파일 패턴 (정규식) | .*\.bs\.js | | -o, --output <file> | 출력 파일 경로 | stdout | | --clean | 빌드 전 이전 결과물 정리 | false | | --no-push | git push 생략 | false |

설정 파일

프로젝트 루트에 .reifierrc 파일을 생성하면 기본값을 설정할 수 있다.

{
  "buildCommand": "pnpm build",
  "pattern": ".*\\.mjs$"
}

CLI 옵션이 설정 파일보다 우선한다.

작동 방식

  1. 캡처: 각 브랜치에서 빌드 실행 후, 패턴에 맞는 파일들을 _artifacts/{branch}/ 디렉토리에 복사
  2. 저장: reified라는 orphan 브랜치에 결과물 커밋 (히스토리 추적용)
  3. 비교: 두 브랜치의 _artifacts 디렉토리를 diff로 비교
  4. 렌더링: diff2html로 보기 좋은 HTML 생성

사용 예시

ReScript 프로젝트

# .bs.js 파일 비교 (기본값)
reifier run . --base main --head feature

Next.js 프로젝트

reifier run . --base main --head feature \
  --build "npm run build" \
  --pattern ".next/.*\.js$"

일반 JavaScript 프로젝트

reifier run . --base main --head feature \
  --build "npm run build" \
  --pattern "dist/.*"

라이브러리로 사용

import { capture, diff, run } from 'reifier';

// 전체 파이프라인
await run({
  repo: '.',
  base: 'main',
  head: 'feature',
  buildCommand: 'npm run build',
  pattern: '.*\\.js$',
  output: 'diff.html',
});

// 개별 명령어
await capture({
  repo: '.',
  branch: 'main',
  buildCommand: 'npm run build',
  pattern: '.*\\.js$',
});

await diff({
  repo: '.',
  base: 'main',
  head: 'feature',
  output: 'diff.html',
});

License

MIT