fb-watchman
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
bser | 2.1.1 | 5.44 kB | Apache-2.0 | prod |
fb-watchman
is a filesystem watcher that utilizes the Watchman file watching service by Facebook. This versatile system provides file change notification services using highly efficient recursive watches. It also enables more advanced matching of modifications, and filesystem tree query operations via its robust expression syntax.
To use fb-watchman
, you first need to install the Watchman file watching service. Then, the fb-watchman
module can be installed using npm, by running npm install fb-watchman
in your project directory.
In the context of fb-watchman
, Watchman watches directories recursively. Each watched directory is referred to as a root
. You must initiate a watch
on a root
using the watch-project
command before subscribing to changes. Instead of watching multiple sibling directories individually, watch-project
consolidates and re-uses existing watches relative to a project root. This project root is where your .watchmanconfig
or source control repository root is located. Change notifications are always relative to this project root.
To use fb-watchman, you must become familiar with the key concepts and commands used in the module. Although a specific code usage example is not provided in the readme, understanding how to use the watch-project
command and the structure of root
directories is essential for successful implementation.
The documentation for fb-watchman
and more details on how to use it are available on the NodeJS watchman documentation page. This page is a comprehensive resource that includes how to effectively integrate fb-watchman
into your Node.js projects, working with Watchman commands, and how notifications of changes work. For the full advantage of the fb-watchman
filesystem watching capabilities, a thorough read of the documentation is highly encouraged.