Skip to content

Commit

Permalink
skip write file when no change
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 committed Mar 26, 2018
1 parent d5d8f77 commit 7b801d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/standalone.js
Expand Up @@ -218,7 +218,9 @@ module.exports = function(
const fixedCss = postcssResult.root.toString(
postcssResult.opts.syntax
);
fixFile = pify(writeFileAtomic)(absoluteFilepath, fixedCss);
if (postcssResult.root.source.input.css !== fixedCss) {
fixFile = pify(writeFileAtomic)(absoluteFilepath, fixedCss);
}
}

return fixFile.then(() =>
Expand Down

0 comments on commit 7b801d2

Please sign in to comment.