optimizely/marketing-website — pull request #571 by dtothefp (2014-10-28 16:58:11+00:00)
Title: add grunt modernizr and make modernizr global in jshint config

This PR addresses https://github.com/optimizely/marketing-website/issues/529, the `connection closed` warning that was appearing in the Chrome console. This was also affecting mine and Stewart's local dev environment, intermittently crashing Chrome with the 'Oh Snap' warning.

Somehow our Modernizr build was causing this issue. When researching Modernizr builds I found grunt-modernizr, which is a great solution that parses through our JS files and builds our Modernizr based only upon what we have use. We can also specify some defaults in our build if need be. I also change JSHint globals to include Modernizr because I think the grunt plugin was not recognizing `window.Modernizr`. In turn I removed the `window` prepended to any Modernizr calls. I also added the Modernizr tasks to all our our configured tasks for server/build/test.

Don't forget to `npm i` to test it out