stefanpenner / hash-for-dep

7 stars 11 forks source link

support an array of dependencies resolved at the same relative path #27

Open tomdale opened 8 years ago

stefanpenner commented 5 years ago

@tomdale Is the following what you would like to see?

hashForDep(['rsvp', 'glimmer', 'ember-source'], __dirname);

Which would be shorthand for:

const sourceHashes = ['rsvp', 'glimmer', 'ember-source'].map(x => hashForDep(x, __dirname)).join('\x00');
crypto.createHash('sha1').update(sourceHashes).digest('hex');