shakacode / bootstrap-sass-loader

Webpack Loader for the Sass version Twitter Bootstrap
MIT License
118 stars 25 forks source link

Placeholder for Bootstrap 4.0 #32

Closed justin808 closed 8 years ago

justin808 commented 9 years ago

Right now, we only support Bootstrap 3.x.

This is issue is opened to track what's needed for Bootstrap 4.x support.

sunkant commented 9 years ago

Yes, this tool is so cool and useful, and I am eagerly waiting for the new version that supports the awesome Bootstrap 4.0. Hope we can use it as soon as possible :+1:

justin808 commented 9 years ago

@lukeqi Feel free to create a PR or advise me on what changes are needed.

markusjwetzel commented 9 years ago

I have created a fork of this package that supports Bootstrap 4:

github: https://github.com/markusjwetzel/bootstrap-v4-webpack npm: https://www.npmjs.com/package/bootstrap-v4-webpack

Since Bootstrap switched from Less to Sass, there is no extra Bootstrap 4 Sass package. So it might be the best solution to integrate my fork into bootstrap-webpack someday when Bootstrap 4 is officially released. What do you think?

maxbates commented 9 years ago

@markusjwetzel There is no way to file issues on your repo, but the peerDependencies (bootstrap@twbs/bootstrap#v4-dev) are incompatible with the version of bootstrap that is installed (bootstrap@4.0.0-alpha). I'm not sure how you installed bootstrap, but what you have it not working for me.

justin808 commented 9 years ago

@markusjwetzel Please let me know how close this is being ready to merge. If it's close, I'll try to take a look at this in the next few days.

markusjwetzel commented 9 years ago

I have enabled issues for my repository and changed back bootstrap peer dependency to "bootstrap": "*". Please let me know if it works for you now. @maxbates

maxbates commented 9 years ago

Think the * syntax is wrong: https://docs.npmjs.com/files/package.json#peerdependencies Also note (I believe) specifying ^4 won't work because it's alpha

markusjwetzel commented 9 years ago

@maxbates I am pretty sure that the syntax is not wrong. It works for me with these two lines in my packages.json:

    "bootstrap": "twbs/bootstrap#v4-dev",
    "bootstrap-v4-webpack": "^1.0.1",

So I think you must do something wrong. Are you sure that you have installed bootstrap v4 correctly? I think that bootstrap v4 is not on npm yet. That's why I use the github repo branch "twbs/bootstrap#v4-dev" instead.

@justin808 Yes, it should be ready. As I said I am not sure whether it is a good idea or not to merge it with this repo, but that's up to you. :)

maxbates commented 9 years ago

npm (v 2.14.4) log reads:

npm ERR! peerinvalid The package bootstrap@4.0.0-alpha does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer bootstrap-v4-webpack@1.0.1 wants bootstrap@*

When installing bootstrap@twbs/bootstrap#v4-dev, even if it appears as such in package.json, the version is still registered as bootstrap@4.0.0-alpha

I am running npm install bootstrap@twbs/bootstrap#v4-dev

justin808 commented 9 years ago

We're going to merge this within the next day or so. Looks great!

We'll add one more setting in the config file:

bootstrapVersion: < 3 or 4 >  

Here's the PR: https://github.com/shakacode/bootstrap-sass-loader/pull/38

CC: @alexfedoseev, as he's going to take a look at this in about 12 hours and do some general refactoring to make the loader work with both, PLUS support CSS modules: https://github.com/shakacode/bootstrap-sass-loader/issues/36

justin808 commented 9 years ago

@markusjwetzel Please get in touch with us at either justin@shakacode.com or alex@shakacode.com if you want to join our slack room and possibly pair on these changes. @alexfedoseev is in Moscow time, which is closer to you. Thanks again for figuring this out!

markusjwetzel commented 9 years ago

@maxbates npm install bootstrap@twbs/bootstrap#v4-dev works for me. I don't know how you have managed to install bootstrap@4.0.0-alpha as there is no such version on npm. I am sorry, but I don't have any more ideas to solve your problem.

@justin808 This repo and my repo/pull request have different peer dependencies (bootstrap-sass vs bootstrap). And I guess they will even have different ones after the official release of bootstrap 4, because bootstrap will very likely put v4 sass files into the bootstrap package. So it is done by just adding one more setting bootstrapVersion: < 3 or 4 >. Do you have a solution for this? What about creating a new repo shakacode/bootstrap-loader or someting like this for bootstrap 4?

alex35mil commented 9 years ago

WIP: https://github.com/shakacode/bootstrap-loader/pull/1 Feel free to comment.

justin808 commented 9 years ago

FYI -- we'll soon be transitioning to the name bootstrap-loader and the new loader which supports CSS modules and Bootstrap 3 & 4: https://github.com/shakacode/bootstrap-loader/pull/1.

justin808 commented 8 years ago

@alexfedoseev I think we're ready. Closing this issue and opening a new one with the migration checklist.

Example implementation here: https://github.com/shakacode/react-webpack-rails-tutorial/pull/175