rust-change-detection
v0.1.2
Published
A files change detection tool written in Rust
Readme
rust-change-detection
Change detection library written is rust, using file hashes to detect changes in files and directories.
Using gxhash for hashing files
Usage
- Install the package
yarn add rust-change-detection --devor
npm install rust-change-detection --save-dev- Set environment variable
export RCD_FOLDERS=./packages- Add rcd to your package.json scripts
{
"scripts": {
"rcd": "rcd"
}
}- Run the command
yarn rcd- You can find the logs in the
.rcd_logfile
Tips
- You can create a
.envfile in the root of your project and add theRCD_FOLDERSvariable there. - And load the
.envfile before running the command, using a package likedotenv-cliorcross-envorenv-cmd.
{
"scripts": {
"rcd": "env-cmd .env rcd"
}
}Environment Variables
| Variable | Description | Default | Required |
|----------|-------------|----------|----------|
| RCD_FOLDERS | The folders to watch for changes | none | true |
| RCD_IGNORE_FOLDER | The folders to ignore with ; as separator | node_modules;dist;.git;coverage;.turbo | false |
| RCD_IGNORE_FILE | The files to ignore with ; as separator | .gitignore;.prettierrc;.eslintrc;.babelrc;.DS_Store;Thumbs.db | false |
| RCD_HASH_FILE | The file to store the hashes | .rcd_hash | false |
| RCD_LOG_FILE | The file to store the logs, i.e the list of changed files | .rcd_log | false |
| RCD_LOG_LEVEL | The log level, can be info or debug | info | false |
License
MIT
