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.

Package Sidebar

Install

npm i affix-hash

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

153 kB

Total Files

12

Last publish

Collaborators

  • dilatorily