-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the bootstrap package in npm to expose css #12441
Conversation
Many modules in npm are starting to expose their css entry files in their `package.json` files. This allows tools like `npm-css`, `rework-npm`, and `npm-less` to import bootstrap from the node_modules directory.
+1 |
This omits |
@@ -11,6 +11,7 @@ | |||
"scripts": { | |||
"test": "grunt test" | |||
}, | |||
"style": "./dist/css/bootstrap.css" |
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.
Missing a comma
Is this emerging standard/convention written down anywhere? |
Sorry, for missing the comma on that one, I'll fix it. :) It's actually not written anywhere but in the code for these modules right now. We're hoping to get this standardized at some point, but we've all reached this convention separately, so I'm inclined to just go with it. Yes, this does omit those. But the theme is optional, and most of these tools allow you to do things like: @import "bootstrap/dist/css/bootstrap-theme.css"; Here are some links to those modules: https://github.com/defunctzombie/npm-css If you want to read about this style of css development, I wrote a thing: http://techwraith.com/your-css-needs-a-dependency-graph-too.html |
Wouldn't |
They would, but they aren't the majority case here. They'd still be able to do the work around that I showed above. |
Also, |
I just submitted a pull request to If that gets merged in, I'll add a |
Ok, looks like Raynos/npm-less#2 was merged, so I updated this PR to allow for less to be imported if you're using npm-less. |
+1 |
1 similar comment
+1 |
Any thoughts on this one yet? I'd really like to see this land :) |
/cc @mdo |
Many modules in npm are starting to expose their css entry files in their `package.json` files. This allows tools like `npm-css`, `rework-npm`, and `npm-less` to import bootstrap from the node_modules directory.
Many modules in npm are starting to expose their css entry files in their package.json files. This allows tools like `npm-css`, `rework-npm`, and `npm-less` to import a module's styles from the node_modules directory. Bootstrap is [in the process](twbs/bootstrap#12441) of adopting this standard as well.
See twbs/bootstrap#12441 and http://stackoverflow.com/questions/32037150/style-field-in-package-json Usage with `rework-npm`: In your `.css` file.... @import 'ionicons';
Many modules in npm are starting to expose their css entry files in their `package.json` files. This allows tools like `postcss-import`, `parcelify`, `npm-css`, `rework-npm` and `npm-less` to import *rc-slider* straight from node_modules directory. Example: ```css @import 'rc-slider'; ``` Reference: twbs/bootstrap#12441
Many modules in npm are starting to expose their css entry files in their
package.json
files. This allows tools likenpm-css
,rework-npm
, andnpm-less
to import bootstrap from the node_modules directory.