@ng-doc/builder
Version:
<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>
19 lines • 619 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.createCacheForFile = createCacheForFile;
const tslib_1 = require("tslib");
const crypto = tslib_1.__importStar(require("crypto"));
const fs = tslib_1.__importStar(require("fs"));
/**
* Creates cache for given file
* @param filePath - path to file, for which cache should be created
*/
function createCacheForFile(filePath) {
try {
return crypto.createHash('md5').update(fs.readFileSync(filePath, 'utf-8')).digest('hex');
}
catch (e) {
return '';
}
}
//# sourceMappingURL=create-cache-for-file.js.map
;