anandthakker / doiuse

:bomb: Lint CSS for browser support against caniuse database.
MIT License
1.25k stars 51 forks source link

require fulldata for easier browserify #34

Closed groovecoder closed 8 years ago

groovecoder commented 8 years ago

I don't expect this should be merged lightly ...

I changed the code to load the entire fulldata-json/data-1.0.js data from caniuse-db, so that the doiuse can be browserify'ed. (browserify doesn't do anything with the require call that includes the dynamic feature name.

This means the script will load the 935KB .json file instead of individually loading up to 326 4KB-7KB .json files from features-json/. I'm not sure which approach is better performance-wise, or if you care enough about it to run some kind of benchmark between them?

anandthakker commented 8 years ago

:+1: I dig it, and it really doesn't seem much different, perf-wise.. might even be better avoiding all those repeated require calls.

Thanks!

I'm gonna add you as a contributor, as per the OPEN open source guidelines: https://github.com/anandthakker/doiuse/blob/master/CONTRIBUTING.md