Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(templates:common): Lint bower.json before executing wiredep. #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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