{"_id":"@caerusjs/yalc-watch","_rev":"1-24cabb11cbcce3e14e989279ca2399e2","name":"@caerusjs/yalc-watch","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.6":{"name":"@caerusjs/yalc-watch","version":"0.0.6","description":"## Why","main":"index.js","bin":{"yalc-watch":"dist/index.js"},"scripts":{"dev":"ts-node src/index","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","lb":"npm run build && yalc publish","bp":"tsc && npm publish"},"keywords":[],"author":{},"license":"ISC","dependencies":{"@types/concurrently":"^4.1.0","@types/node":"^13.1.5","@types/nodemon":"^1.19.0","chalk":"^3.0.0","commander":"^4.1.0","concurrently":"^5.0.2","nodemon":"^2.0.2","sync-directory":"^2.1.0"},"devDependencies":{"typescript":"^3.7.4","yalc":"^1.0.0-pre.34"},"_id":"@caerusjs/yalc-watch@0.0.6","dist":{"shasum":"ff832078bb9babf18a1a5ce80e16462725e03ee4","integrity":"sha512-io4Id+V2Rak2OHGZvPEkectaIZvsB5gL9PzQh00H7uip+1DQPvmRZ3f+kyWP9bhxFzzvSl9FFI7SoLatW8MDdg==","tarball":"https://registry.npmjs.org/@caerusjs/yalc-watch/-/yalc-watch-0.0.6.tgz","fileCount":7,"unpackedSize":6069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj0zyCRA9TVsSAnZWagAAIIUQAJOKDd5B3Ic25dTpJ71y\njgT99pYJxfMN6np6z7DjK7Dokjo3u7/lzX3iAexSnBxEjEWGtPPA8DRiz9SM\nNbqiVwP4v4cercXaNJBdwPNTWJSD0y8h9uEI0yw5ryHZtw9vNhEte5ePmDEt\n7mOdi5a0MxwXcL4QPl+0CZtPDRvTPsLJZWNR80TMgKygO2BO4pOlvsKQbBxd\nGj3JizoH3khXXEIxLRA9Y5wUh7h33OWOY+yb6y6JLRyz/j2Znpw1OJb3e6S4\nYlQEjCYjmTRGf4AqHod0nEJZYRr6oAbdb/OInOH4y2tr9e3nBu4uPZVch6iH\nZE9D+Hk51vx18NY/jKNtk7BaAUxkiLfvbA9Cvn2GIbU988SPP+2KEj8pKnO7\niZ7mwvIITo0QOLM+54OOScVWJX2kOHgd3/gHr6ljhG6fusUEc7my+DRmZJkR\nCr8FxzVlciRPTvW0ZggW+OTStjxWJxCnQ9WOavkimrGW74RkePs9kKV1QAcR\nsVRMAbyY2GvYhLiouf0IStC7DL8Oc/zahSbR8AYpijwIwTeEP64lXLW2MLdi\nuEe/6BAvMAV4jdv979BUV22OYxYAPhAD1lbyZkql4KHbX/d3vD8Ecx9GNrNc\nhM9Dvzk6yKLVR17fBzB0BO/wri9IEgYeLPqM4o9SJ/QG+hxdfhFeLBMu/gck\n8+r/\r\n=YEac\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeJ1810mek6HSSjURxDA97qycQeEmixCaK72COBCeYBwIhANSy0BKfSmIN5W84DkPuu8tINJdDJSBpnDcXXLgBYfUb"}]},"maintainers":[{"name":"krisquigley","email":"kris@krisquigley.co.uk"}],"_npmUser":{"name":"krisquigley","email":"kris@krisquigley.co.uk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yalc-watch_0.0.6_1603226866324_0.8683214687372314"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-20T20:47:45.995Z","0.0.6":"2020-10-20T20:47:46.481Z","modified":"2022-04-04T21:30:09.851Z"},"maintainers":[{"name":"krisquigley","email":"kris@krisquigley.co.uk"}],"description":"## Why","keywords":[],"author":{},"license":"ISC","readme":"# Yalc-watch\n\n## Why\n\n[Yalc](https://github.com/whitecolor/yalc) is an awesome tool for developing and testing your packages / libraries locally without publishing to npm.\n\nThe only thing yalc is currently missing is a way of watching the build output of a library and then automatically pushing that build into the projects you want to test it with.\n\nThis can be really helpful when building something like a design system or component library where you want instant feedback in a consuming app.\n\n## What\n\nThis very simple package will allow you to monitor an output folder (using [nodemon](https://github.com/remy/nodemon) under the hood) and will automatically call `yalc push` when a change is detected.\n\nThe `yalc push` command will _automaticaly_ update all projects where you have previously installed your package locally using the `yalc add your-package-name` command.\n\n> For projects such as [next.js](https://nextjs.org/) or [create-react-app](https://github.com/facebook/create-react-app) this will automatically trigger a live reload of your project.\n\n## How\n\nIn your library / package install `yalc-watch` as a dev dependency:\n\n```\nnpm i yalc-watch --save-dev\n```\n\nAdd the following confic JSON to your `package.json` and tweak to your liking:\n\n```json\n...\n\"yalcWatch\": {\n  \"watchFolder\": \"dist\",\n  \"buildWatchCommand\": \"tsc --watch\",\n  \"extensions\": \"js,png,svg,gif,jpeg,css\",\n}\n...\n```\n\nStill in your `package.json` add the following to the `scripts` section:\n\n```json\n\"scripts\": {\n  ...\n  \"yalc-watch\": \"yalc-watch\",\n  ...\n}\n```\n\nNow simply run the command:\n\n```\nnpm run yalc-watch\n```\n\n`yalc-watch` will start running the configured `buildWatchCommand` and look for changes in your configured `watchFolder`. When a change is detected the `yalc push` command will be executed updating all projects that added your package using `yalc add your-package-name`.\n\n> If you haven't already done so. You need to install your package in the consuming app using the `yalc add your-package-name` for `yalc push` to have any effect.\n\n_Enjoy!_\n","readmeFilename":"Readme.md"}