Fix build query not including setclasses when passed as an option #1772

Merged
merged 1 commit into from Nov 27, 2015

Projects

None yet

3 participants

@akamike
Contributor
akamike commented Nov 24, 2015

I stumbled upon this when moving from a manually built Modernizr file to a bower installed one. The build URL provided in the file did not include the setclasses property, so installing through bower as a tar.gz omitted this feature - despite the fact the original file used it.

This bug can be demonstrated on the current https://modernizr.com/download site itself:

  1. Pick your feature detections
  2. Ensure "Add CSS classes" is checked
  3. Build and view the resulting file
  4. Build URL in the header comment is missing setclasses

Example following these steps using inlinesvg generates this codepen: https://codepen.io/anon/pen/KdLxWb

This is happening as the generate script is directly modifying config to remove the setClasses special case option, which means it no longer exists for the rest of the build process (e.g. build-query) to work with.

Another part of this is even if the property was being set, it is using the wrong label anyway, so would still fail to include the setClasses option. This PR fixes that too.

Its usefulness doesn't just lie with copying the build URL for bower, it also makes it more consistently clear what features were intended to be included. Currently, the "bad" URLs work on the site as "Add CSS classes" is checked by default and replaced into the browser history state - shouldn't really depend on that behaviour.

@akamike akamike Fix build query not including setclasses when passed as an option
Includes a correction to the output property in the build query, as
the current site expects.
b527c3a
@ryanseddon ryanseddon merged commit 86d7ee6 into Modernizr:master Nov 27, 2015

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ryanseddon
Member

Amazing, thanks!

@ryanseddon
Member

@patrickkettner will this kick off a new deploy for the site or do I need to trigger it?

@patrickkettner
Member

already set it off

On Thu, Nov 26, 2015 at 6:41 PM, Ryan Seddon notifications@github.com
wrote:

@patrickkettner https://github.com/patrickkettner will this kick off a
new deploy for the site or do I need to trigger it?


Reply to this email directly or view it on GitHub
#1772 (comment).

patrick

@akamike
Contributor
akamike commented Dec 2, 2015

@patrickkettner I checked the site to see the change in action, however it is still exhibiting the original issue. Was this deployed? Running https://github.com/Modernizr/modernizr-neue locally works fine.

@patrickkettner
Member

try now?

On Wed, Dec 2, 2015 at 6:23 AM, Mike Robinson notifications@github.com
wrote:

@patrickkettner https://github.com/patrickkettner I checked the site to
see the change in action, however it is still exhibiting the original
issue. Was this deployed? Running
https://github.com/Modernizr/modernizr-neue locally works fine.


Reply to this email directly or view it on GitHub
#1772 (comment).

patrick

@akamike
Contributor
akamike commented Dec 3, 2015

All good now, thanks! :)

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