watch
The watch
command will monitor the local file system for any changes and trigger a
rebuild for a package. The watcher will only monitor files within the src
folder of the
package, and will rebuild using default build options.
package.json
{
"scripts": {
"watch": "packemon watch"
}
}
Chokidar is required for file watching, so please install to your project.
- Yarn
- npm
yarn add --dev chokidar
npm install --save-dev chokidar
Options
Watch supports the following command line options.
--debounce
- Number of milliseconds to wait after a change before triggering a rebuild. Defaults to150
.--poll
- Poll for file changes instead of using file system events. This is necessary if going across the network or through containers.--skipPrivate
- Skipprivate
packages from being watched.