Crates.io | cache_bust_cli |
lib.rs | cache_bust_cli |
version | 0.2.0 |
source | src |
created_at | 2024-05-23 13:50:18.052909 |
updated_at | 2024-05-29 15:40:38.360079 |
description | CLI tool for use in conjunction with the cache_bust crate to add hashes to file names |
homepage | |
repository | https://github.com/dav-wolff/cache_bust |
max_upload_size | |
id | 1249509 |
size | 15,544 |
This is a CLI-tool to be used in combination with cache_bust to add hashes to file names.
Using cargo:
cargo install cache_bust_cli --locked
Using nix:
nix shell github:dav-wolff/cache_bust#cli
Rename all files in a directory in-place:
cachebust assets
Copy all files in a directory to a new directory with hashes added:
cachebust assets --out hashed_assets
Rename a single file in-place and print its new name or hash:
cachebust assets --file image.png --print file-name # image.d0a2[...].png
cachebust assets --file image.png --print hash # d0a2[...]
Copy a single file to a new directory with its hash added and print its new path:
cachebust assets --file image.png --print file-path # /path/to/image.d0a2[...].png