diff --git a/scripts/core/file.js b/scripts/core/file.js index d3c7b384..55300e7e 100644 --- a/scripts/core/file.js +++ b/scripts/core/file.js @@ -26,6 +26,10 @@ file.exists = function (filepath) { return fs.exists(path.resolve(filepath)) } +file.existsSync = function (filepath) { + return fs.existsSync(path.resolve(filepath)) +} + file.read = function (filepath) { return fs.readFile(path.resolve(filepath), { encoding: 'utf8' }).catch(console.error) }