Skip to content

donkeybanana/fos-build-md5sum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM version Build Status Dependency Status

FrogOS Build MD5sum

Generate a unique identifier for matched files within a given path.

Install

$ npm install --save fos-build-md5sum

Usage

var fos-build-md5sum = new (require('fos-build-md5sum'))();

Options

Configuration may be specified via the constructor or the prototype this.options() method:

// Instantiation
var fos-build-md5sum = new (require('fos-build-md5sum'))({
  pattern: '*.js'
});

// Runtime
fos-build-md5sum.options({
  root: 'some/new/path'
});

pattern

Default: **.*

The glob pattern of the files to match.

encoding

Default: base64

From the hash.digest([encoding]) man page:

Calculates the digest of all of the passed data to be hashed. The encoding can be hex, binary or base64. If no encoding is provided, then a buffer is returned.

algorithm

Default: md5

From the crypto.createHash(algorithm) man page:

Creates and returns a hash object, a cryptographic hash with the given algorithm which can be used to generate hash digests.

algorithm is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are sha1, md5, sha256, sha512, etc. On recent releases, openssl list-message-digest-algorithms will display the available digest algorithms.

dest

Default: production.md5

The filepath to read a saved hash from via this.compare(), relative to config.root.

root

Base path to match config.pattern.

License

MIT © Alan Burgoyne

About

FrogOS Build md5sum

Resources

Stars

Watchers

Forks

Packages

No packages published