reworkcss / rework-npm

Import CSS from npm modules using rework
BSD 2-Clause "Simplified" License
87 stars 19 forks source link

Support "main" for compatibility with Bower #19

Open ariofrio opened 9 years ago

ariofrio commented 9 years ago

Packages such as purecss work with Bower by setting the "main" field in package.json to the CSS file. This change makes such packages work with rework-npm out of the box.

conradz commented 9 years ago

Would it make sense to only use main if it is a .css file?

Also this is a breaking change since it used to find index.css if no style field was specified, now it will also check the main field.