-
-
Notifications
You must be signed in to change notification settings - Fork 873
Add style property to package.json, allowing for easier imports. #978
Conversation
Add style property to package.json, allowing for easier imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge this, it would make Bourbon installable with diamond :)
I’m hesitant to add non-standard fields… Have these changes been tested with npm-sass and sass-module-importer? |
@tysongach Yes, I've tested with both. The same can be said for the similar PR I made on Neat. |
@tysongach I get your hesitation to use a non-standard field, but I'm not really seeing the downside. It shouldn't affect any projects that don't make use of it. Bootstrap added "style" to package.json two and a half years ago. They chose to point to their compiled css file rather than a pre-processor source in order to support the majority use case. In the case of Bourbon, all your users are Sass users of course, so adding |
I’m mostly concerned with maintenance. I know it’s just “one line”, but there are many of these “one lines” sprinkled throughout for other third-party integrations that we have to maintain when things change and break. Since it is not standardized, we can’t follow a systemized approach. The fact that npm-sass and sass-module-importer both use I totally see where you’re coming from, but it’s tough as a library to support “all the things” and strive to be bug-free. |
More than a coincidence, I think. npm-css, rework-npm, npm-less, parcelify, and as @Hackzzila suggested above diamond all use it too. Of course only the latter two apply to Sass. Though not an official standard, there seems to be a lot of support for 'style'.
I'll note that both npm-sass and sass-module importer support using a sass file for 'main' as well as for 'style'. I'm not sure how this would affect using Bourbon with other tools, but since as you point out Bourbon is a collection of Sass partials, there's something a bit illogical about having a javascript file as it's |
Definitely, and it is something I’ve never really been happy with. We used to set |
I am in support of either a |
One last point in support of the |
What is the status on this? |
Thanks, @davejtoews, merged as c10f0bf. |
When installed via npm, a style property in package.json allows this module to be easily imported when using tools such as npm-sass or sass-module-importer.
Apparently the "style" key is not a standard, but it is a growing trend. Here's a StackOverflow thread on the subject: http://stackoverflow.com/questions/32037150/style-field-in-package-json