Do one thing well

#2 · closed · 4 comments

View on GitHub ↗

blakeembrey

I actually wanted to use this module, until I found that it does 1001 things I don't need. I actually just want access to the generated JSON file with all known CSS properties - I don't really care for the the module having a HTML parser, request library and flow control library bundled. It increases dependency size unnecessarily. Can these be removed in favour of directly exporting just a single JSON file which is an array?

Comments

johno

Sounds reasonable to me : ). I'm thinking the actual CSS property scraping can be its own module, ensuring this is as lightweight as possible (there are undoubtedly overlapping concerns here causing dependency bloat). I'll try to get a new version together and published shortly.

blakeembrey

@johnotander Thanks. It doesn't need to be another module really, it could just be a build script. I do something similar for `language-map` (https://github.com/blakeembrey/language-map/blob/master/package.json#L7-L8). Edit: Though I could probably avoid even checking in `languages.json` and just do it on `prepublish`.

johno

Ah, yeah, good point.

johno

Opened up PR #3 to remove the dependencies (now becoming development dependencies) and export the properties as an array from the JSON file. Please let me know if I missed something. Thanks!