Skip to content

Commit

Permalink
fix: don't call prettier when no files updated (#2539)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoon authored Apr 14, 2018
1 parent 882ed03 commit 5430b8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ function runPrettier(command, cb) {
})
.join(' ');

if (!files) {
return cb();
}

exec(
`node ./node_modules/.bin/prettier --write --print-width 100 --single-quote --trailing-comma es5 ${files}`,
function(err, stdout, stderr) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5430b8f

Please sign in to comment.