rewrite in es6 modules
Author: jonathanongCreated May 5, 2014Updated Jul 21, 2023
i'm currently working on https://github.com/normalize/package-management. the idea is that i should be able to just create a custom modernizr file like so from my app:
import 'https://github.com/modernizr/modernizr/3.0.0/feature-detects/css/boxshadow.js'
import 'https://github.com/modernizr/modernizr/3.0.0/feature-detects/css/boxsizing.js'and simply do <script src="modernizr-custom.js"> in my <head>. all the modernizr parts will eventaully be spdy pushed in development, and there will be an optional compile step to concat/minify.
currently, everything is written AMD, which would require a lot of detangling to work with ES6 modules (i mean i could, but i'm lazy). would be nice if modernizr were rewritten using ES6 modules (and of course compile down to ES4 when creating builds). it would also make all the source code easier to read as well as make modernizr future-proof.
Source: Modernizr/Modernizr