rust-change-detection

0.1.2 • Public • Published

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

  1. Install the package
yarn add rust-change-detection --dev

or

npm install rust-change-detection --save-dev
  1. Set environment variable
export RCD_FOLDERS=./packages
  1. Add rcd to your package.json scripts
{
  "scripts": {
    "rcd": "rcd"
  }
}
  1. Run the command
yarn rcd
  1. You can find the logs in the .rcd_log file

Tips

  • You can create a .env file in the root of your project and add the RCD_FOLDERS variable there.
  • And load the .env file before running the command, using a package like dotenv-cli or cross-env or env-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

/rust-change-detection/

    Package Sidebar

    Install

    npm i rust-change-detection

    Weekly Downloads

    26

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    459 kB

    Total Files

    4

    Last publish

    Collaborators

    • lelouch77