1 | const path = require('path')
|
2 | const crypto = require('crypto');
|
3 | const findCacheDir = require('find-cache-dir');
|
4 |
|
5 | const cacheDir = findCacheDir({name: 'carmi'});
|
6 |
|
7 | module.exports = options => {
|
8 | const hash = crypto.createHash('md5').update(JSON.stringify(options)).digest('hex');
|
9 | return path.resolve(cacheDir, hash);
|
10 | }
|