vkadam / grunt-jsbeautifier

Beautify js, css, html and json files using Grunt and https://github.com/einars/js-beautify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hangs on missing HTML files

TheHalcyonSavant opened this issue · comments

When the specified files can't be found by the multitask src configuration pattern, then jsbeautifier task starts some infinite loop in the background and it doesn't return immediately. To reproduce this bug, just use the following simple HTML configuration:

jsbeautifier: {
  html: {
    src: ["app/views/*.html"]
  }
}

and leave the src folder empty.
Now, try run grunt jsbeautifier:html and it'll never return - will hang forever.

commented

same issue here. We did a workaround by adding a dummy file into the empty folder, but this is a bad hack (even if it helps to workaround it)

Fixed with upgrade of async dependency in commit e48b8fd, test added in commit ccfd245. Will be available with version 0.2.12
This makes #53 not required.