Was modernizr removed from 8.3.0 to make Sage more lightweight and to let the developer decide whether to include it or not? I always thought this should be included as standard like it is in HTML5 Boilerplate?
noob
Was modernizr removed from 8.3.0 to make Sage more lightweight and to let the developer decide whether to include it or not? I always thought this should be included as standard like it is in HTML5 Boilerplate?
noob
I think they removed it because IE8 is no longer supported and itās easy to re-add it yourself:
OK thanks @Twansparant
So, to try and add modernizr back in I have
run $ bower install --save modernizr
checked in bower.json file that the following exists:
ādependenciesā: {
āmodernizrā: ā~3.2.0ā
},
āoverridesā: {
āmodernizrā: {
āmainā: ā./modernizr.jsā
}
I only added the above because thats how my bower.json looked in Sage before modernizr was removed.
ājquery.jsā: {
ābowerā: [ājqueryā]
},
āmodernizr.jsā: {
ābowerā: [āmodernizrā]
}
Again because this is how it looked previously (!)
wp_enqueue_script(āmodernizrā, Assets\asset_path(āscripts/modernizr.jsā), [], null, true);
Again, as previous
But modernizr still doesnt exist : āReferenceError: Modernizr is not definedā in firebug
So I checked the bower_components/modernizr and there is no modernizr.js, but there is a grunt file⦠Am I supposed to run āgruntā inside bower_components/modernizr to create the modernizr.js file?
I havenāt done this yet because I thought we werent supposed to touch files inside bower_components?
@Twansparant any ideas? Or anyone else?
That should work!
I have exactly the same in my bower.json:
"overrides": {
"modernizr": {
"main": [
"./modernizr.js"
]
}
}
and manifest.json:
"modernizr.js": {
"bower": ["modernizr"]
},
But with version 2.8.2, maybe thatās the difference, because I do have a modernizr.js file in there?
yeah iāve been trying to fold modernizr back into sage for the last few weeks. tried everything here and so far nothing has been working.
Come on guys, have you been to the Modernizr website since version 3 launched? Itās completely different now. There is no base pre-compiled version with all the options selected anymore. The docs tell you that you need to either run modernizr from the command line or run their grunt script.
This workflow obviously hasnāt been tested with Sage because it was removed back in Modernizr v2 days, this is the new v3 workflow.
If you want the old drop-in Modernizr workflow that Sage used to have, just set Bower to get the latest Modernizr v2 build, which looks like v2.8.3
oops
To be honest, there are so many different things to learn in trellis, bedrock, sage, that if something breaks or doesnāt work I always assume its something Iāve done wrong!
I ended up grabing a copy of modernizr 2.8.3 of a html5 boilerplate and using manifest.json to pull it in.
Ive come to Sage post grunt and skipped that whole thing. Man, too many workflows not enough time to learn them all AND get the jobs you are paid to do completed.
Yep, if youāre jumping in to all 3 at once, that is a ton of stuff to learn. Glad youāre figuring it out though
yeah step by step⦠somethings are just kinda like - ok that works, dont touch that! This is broken, so try all the things until it either breaks some more or works.
No method, just madness!