Enhancements to the JS part + enhance gruntfile + ignore Jetbrains IDE config folder

I code in a Jetbrain IDE, so for those who do like me, Jetbrains adds automatically a .idea folder which contains all the config for IDE. I had add it to gitignore.

I've added too some packages to grunt process. One which automatically load the others needed package. Simplifying the maintenance of the grunt file. And the JSONLint validator which lint JSON files.

And finally I have passed some fix on JS scripts, see details in commit messages
Nit: space after `if`