Per https://github.com/Modernizr/grunt-modernizr/issues/118#issuecomment-140..., that path has been removed since 3.0, and won't be re-added. Therefore there's no longer a "default" build of Modernizr.

I suppose there's 2 options moving forward-

  1. Define a "default" build of Modernizr, and update drush modernizr-dev to utilize it.
  2. Remove the modernizr-dev command.

Please let me know the preferred direction, and I'll be happy to submit a patch.

Comments

Albert Volkman created an issue. See original summary.

rupl’s picture

Well snap. 5 months ago when I released the hacked-together workaround for v3 they hadn't removed the file yet. I've been traveling since then..

$ curl -i https://modernizr.com/downloads/modernizr-latest.js
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 17 Feb 2016 17:17:33 GMT
Content-Length: 0
Connection: keep-alive
cache-control: no-cache
Strict-Transport-Security: max-age=15768000

This might have surfaced sooner if it wasn't 200ing the empty file. Would be nice if it were 404 or 410. I've asked the Modernizr folks if it's possible to modify the URL to report the proper status code.

In terms of what the module should do, I'd say go with option 2: remove the modernizr-dev drush command. This has ramifications beyond the module code itself (have to update docs, project page instructions, etc) but whatever. I'll fix it all up in April at the latest when I am back home.

For now I'm in the middle of SE Asia and often find myself in areas not offering fast internet access, so if you write a patch please forgive my delayed review.

albert volkman’s picture

Status: Active » Needs review
StatusFileSize
new4.83 KB
rupl’s picture

Status: Needs review » Needs work

Hey actually I realized we should probably leave the actual command in place, but have it produce a deprecation notice. That way we won't have to update all the docs immediately and people will understand that something has changed in cases where they might have embedded this command into a script or something.

albert volkman’s picture

I don't follow... as it stands, it'll download a blank file. If we simply add a deprecation notice, I'm assuming a lot of people will overlook that, merge the blank library, and then wonder why it's not working.

rupl’s picture

I mean instead of deleting the command completely, the drush command could be modified to no longer fetch the file, instead immediately returning a Drupal Error. The error would report that the library file is permanently unavailable. The command description could also be changed to say "This command used to download a development copy of Modernizr but it is no longer offered on modernizr.com as of v3"

albert volkman’s picture

Status: Needs work » Needs review
StatusFileSize
new4.18 KB

How about this?

rupl’s picture

Status: Needs review » Fixed
+++ b/modernizr.install
@@ -107,7 +107,7 @@ function modernizr_requirements($phase) {
+            $tests_description = t('Modernizr only works with a custom build. Visit the !modernizr-settings to create one.', array('!modernizr-settings' => l(t('Modernizr settings page'), 'admin/config/development/modernizr')));

Nice catch on this rewording of the requirements! I tested this and it seems good to me. I'll merge and cut a new version of the module.

Side note: the URL now reports a 404 and the contents are a message about the file being deprecated. This will help the users who aren't yet using the new version of the module.

rupl’s picture

New release (7.x-3.8) — https://www.drupal.org/node/2677048

albert volkman’s picture

Great! Nice work upstream as well :)

albert volkman’s picture

Oh, you might want to check out the project page as well. Current text reads-

If you use Drush, the module will automatically download a development version for you when you enable the module. However, it will be a Modernizr v2, and you should be creating a custom build using our config panel which will give you a Modernizr v3 custom build.

  • rupl committed 1f32e61 on 7.x-3.x authored by Albert Volkman
    Issue #2670574 by Albert Volkman, rupl: modernizr-latest.js no longer...
rupl’s picture

ah thanks for the reminder, I edited the page

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.