Skip to content

Conversation

@Yatoom
Copy link

@Yatoom Yatoom commented May 15, 2015

I recommend linting bower.json before running wiredep. When there is, say, a trailling comma in bower.json and the wiredep task (grunt wiredep) is executed, the user will not get a very helpful message:

Running "wiredep:app" (wiredep) task
Warning: Unexpected token } Use --force to continue.

Aborted due to warnings.

You see, the error could be in any file. By running jsonlint first, we get a much more helpful error message.

Running "jsonlint:all" (jsonlint) task
>> File "bower.json" failed JSON validation.
Warning: Parse error on line 15:
...nario": "~1.3.6",  },  "resolutions": 
----------------------^
Expecting 'STRING', got '}' Use --force to continue.

Aborted due to warnings.

If everything is fine, the user will see the following messages:

Running "jsonlint:all" (jsonlint) task
>> 1 file lint free.

Running "wiredep:app" (wiredep) task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant