RS-Token-Recommendations is a Rust-based command-line utility that scans Svelte, CSS, and SCSS files in a specified directory and its subdirectories to detect hard-coded pixel values. It then recommends the nearest spacing tokens from a predefined list.
This is the Rust version of my original project that I wrote in TypeScript/Node.js.
To use this program, download the appropriate binary for your operating system (Windows or Unix) from the GitHub releases.
rs-token-recommendations.exe "path/to/your/project"
Replace "path/to/your/project" with the path to the directory you want to scan.chmod +x rs-token-recommendations
./rs-token-recommendations "path/to/your/project"
Replace "path/to/your/project" with the path to the directory you want to scan.The program will scan the specified directory and output the detected hard-coded pixel values, along with the recommended tokens, to the console. The output will also be saved to an output.txt file in the current working directory.
If you want to build the project from source or contribute to it, please refer to this GitHub repository.