From 8375b2ab61878e17910e2786becef0f9a2e5ee50 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 17 Jul 2014 11:01:16 -0400 Subject: [PATCH] fix(minify) optimize isExist: fs.exists -> fs.lstat --- lib/server/minify.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/server/minify.js b/lib/server/minify.js index d4e4874e..d40bc918 100644 --- a/lib/server/minify.js +++ b/lib/server/minify.js @@ -37,9 +37,7 @@ minifyName = Minify.getName(name), isChanged = exec.with(IsChanged.isFileChanged, name), - isExist = function(callback) { - fs.exists(minifyName, callback); - }; + isExist = exec.with(fs.lstat, minifyName); exec.parallel([isChanged, isExist], function(error, changed, exists) { if (changed || !exists)