serverless/lib/utils/getCacheFile.js
2017-06-08 01:27:11 +07:00

14 lines
404 B
JavaScript

'use strict';
const fileExistsSync = require('./fs/fileExistsSync');
const readFileSync = require('./fs/readFileSync');
const getCacheFilePath = require('./getCacheFilePath');
const getCacheFile = function (servicePath) {
const cacheFilePath = getCacheFilePath(servicePath);
if (!fileExistsSync(cacheFilePath)) return false;
return readFileSync(cacheFilePath);
};
module.exports = getCacheFile;