While developing some libraries I noticed that npm link
, yarn link
and also partially yalc
sometimes have problem
when it comes to mimicking the publish process and create an acutally working local environment.
So yaln
will simply "create" a simple local npm registry.
It will:
- Use
npm pack
to create an actual npm package file and store it in~/.yaln/packages/
. - It will watch for changes of packages in
~/.yaln/packages/
and installs them locally.
npm i -g @chbiel/yaln
Or from source
git clone ...
cd ...
npm i -g .
tsc-watch --onSuccess "yaln pack"
rollup -c --watch --watch.onBundleEnd="yaln pack"
npm run watch --watch.onBundleEnd="yaln pack"
yaln watch [package list]
Simple pre commit hook to ensure no file references in package json get committed:
- id: no-relative-packages
name: no-relative-packages
entry: bash -c "git diff --cached --name-only | grep -q 'package.json' && cat package.json | grep -E 'file:.+\/\.lnpm\/.+' && echo -e 'file references not allowed in package.json' 1>&2 && exit 1 || exit 0"
language: system
pass_filenames: false
- Looks like sometimes, when the first package update gets detected, the package gets installed twice
- Support
yarn
- Add command to add dependency without watch
- Allow configuration of exchangePath
- Add CommonJS support