Fix build query not including setclasses when passed as an option #1772
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
setclasses
Example following these steps using
inlinesvg
generates this codepen: https://codepen.io/anon/pen/KdLxWbThis 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.