Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
UglifyJS.parse 方法的执行,在遇到JS语法问题等时会抛出错误,但是grunt在执行任务的时候不会主动去获取到这些错误,导致kmc直接中断执行,但是不报任何错误,切后续的任务还是会继续执行。对用户来说遇到这样的问题会很难定位到问题。
举例,用户有如下文件:
b.js中包含内容
KISSY.('hello, throw me out!')
,于是在执行kmc的时候解析到 b.js 时候出错,c.js直接就没有被打包,没有报错,但是grunt继续执行。