2 unstable releases
0.2.0 | Feb 22, 2023 |
---|---|
0.1.0 | Feb 20, 2023 |
#487 in Cargo plugins
19KB
311 lines
👋 Introduction
This library was developed in response to difficulties encountered while using cargo-watch for development of Enso. Addressing these issues proved to be challenging, while creation of this library required only a single evening of effort, leveraging well-established and production-ready JavaScript libraries outlined in this document. Functioning in a manner akin to cargo-watch, this library operates more effectively across multiple systems, mitigating multiple important concerns, including:
- Cargo-watch exhibits erratic performance on modern MacOS, potentially causing indefinite loops.
- Cargo-watch may loop endlessly when employed within complex Git repositories.
- Cargo-watch lacks support for certain
.gitignore
syntax, including negative patterns. - Cargo-watch misconstrues certain syntax in the
.gitignore file
, leading to the erroneous monitoring of files that should be exempt.
⚙️ How this library is made?
This library is a concise wrapper, comprising less than 300 lines of code, over the following libraries:
- Chokidar, a highly efficient, cross-platform file watching library, which is utilized in Brunch, Microsoft's Visual Studio Code, gulp, karma, PM2, browserify, webpack, BrowserSync, and other similar tools listed here.
- Ignore, a manager, filter and parser of the .gitignore spec 2.22.1. This tool is utilized by eslint, gitbook, and other applications as noted here. The library is fully tested and encompasses over five hundred unit tests.
📖 Usage
To install this library, run cargo install cargo-watch-plus
. Then, use cargo watch-plus --help
to see what you can do. By default, when you run cargo watch-plus
in your project, it runs cargo check
if any file has been changed.
This library was designed as in-place replacement for cargo-watch
and implements the same options. If you notice any differences, please let us know and we'll fix them.
👎 Downsides
The only disadvantage of this library is that it is not implemented in pure Rust. On the other hand, it bases on high-quality production-tested libraries, so it should provide you with consistent, good results across different operating systems.
Dependencies
~1.6–9.5MB
~111K SLoC