yalc - 로컬 Node 모듈을 다른 프로젝트에서 바로 테스트. npm link보다 문제 적음 (파일 복사 방식) — symlink 대신 publish 될 파일만 전역 저장소로 복사하고, 앱은 그걸 .yalc 로 끌어온다.1

npm i -g yalc

# 패키지에서
yalc publish          # ~/.yalc에 저장
yalc push             # = publish --push: 저장 + 연결된 모든 프로젝트에 반영

# 앱에서
yalc add my-module
yalc remove my-module && npm install  # 정리

watch 모드: "dev": "tsup src/index.ts --watch --onSuccess 'yalc push'"

.gitignore: .yalc, yalc.lock


Footnotes

  1. yalc README: “When you run yalc publish in the package directory, it grabs only files that should be published to NPM and puts them in a special global store (located, for example, in ~/.yalc).” / “yalc publish --push will publish your package to the store and propagate all changes to existing yalc package installations …” / “yalc push - is a use shortcut command for push operation …” ↩

`#503`