npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here »

affix-hash

1.0.0 • Public • Published

affix-hash

Build Status codecov

Small CLI tool to affix a hash to filenames

Install

$ npm install --global affix-hash

Usage

$ affix-hash --help

  Small CLI tool to affix a hash to filenames

  Usage:
    $ affix-hash <path|glob> [options]

  Options:
    -a, --hash-algorithm  Hash algorithm used. Uses the same list as crypto.createHash. (Default: md5)
                          https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options
    -b, --buffer-length   Length in bytes of the buffer used to read the files. (Default: 8192)
    -d, --dry-run         List what would be renamed instead of renaming.
    -l, --hash-length     Length of the appended MD5 hash. (Default: 20)
    -m, --manifest        Creates a manifest of the renamed files. (Default: false)
    -n, --manifest-name   Name of the manifest file. (Default: manifest.json)

  Examples:
    $ affix-hash main.css -a sha512 -l 25
    $ affix-hash '**.md' '!node_modules' --dry-run

Contributing

Contributions through pull requests are always welcome, no matter how large or small. Unit tests are appreciated!

License

This repository is open source and distributed under the MIT License.

install

npm i affix-hash

Downloadsweekly downloads

12

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability