thanpolas / grunt-closure-tools

Google Closure Tools for grunt
MIT License
95 stars 22 forks source link

Empty src causes exit with error #69

Closed thanpolas closed 7 years ago

thanpolas commented 9 years ago

@betaorbust reported on #67:

The initial issue (where once the glob was expanded, no files were left to be compiled) was fixed in task-closure-tools. There's one related topic, for this repo, where no files are selected. The use case is where the files src list is externally sorted, and may come back empty. Currently this throws a No commands produced for shell execution. Check your config file from closureCompiler.js L62 and quits in failure. My proposal is to check this.files.length and then console warn that no files were selected and the task was skipped, but to not fatally terminate.

My personal issue was fixed with the previous tas-closure-tools PR, but figured I'd mention it here for completeness.

Thoughts, @thanpolas?

thanpolas commented 9 years ago

Yes, what you say makes sense. My only concern is BC, if we go forward with this we'll have to bump the minor rev num to indicate the switch in behavior.

PR?

thanpolas commented 7 years ago

closing due to inactivity, feel free to re-open if the issue persists.