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 build query not including setclasses when passed as an option #1772

Merged
merged 1 commit into from Nov 27, 2015

Conversation

Projects
None yet
3 participants
@akamike
Copy link
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.

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.

ryanseddon added a commit that referenced this pull request Nov 27, 2015

Merge pull request #1772 from akamike/fix_setclasses_build_query
Fix build query not including setclasses when passed as an option

@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

This comment has been minimized.

Copy link
Member

ryanseddon commented Nov 27, 2015

Amazing, thanks!

@ryanseddon

This comment has been minimized.

Copy link
Member

ryanseddon commented Nov 27, 2015

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

@patrickkettner

This comment has been minimized.

Copy link
Member

patrickkettner commented Nov 27, 2015

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

patrickkettner commented Dec 2, 2015

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

This comment has been minimized.

Copy link
Contributor Author

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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.