Using bootstrap with bower

前端 未结 7 1911
無奈伤痛
無奈伤痛 2021-01-30 05:45

I\'m trying to use bootstrap with bower, but since it clones the whole repo, there is no CSS and other stuff.

Does it means that I need to include building Bootstrap in

7条回答
  •  忘掉有多难
    2021-01-30 06:31

    I finally ended using the following : bower install --save http://twitter.github.com/bootstrap/assets/bootstrap.zip

    Seems cleaner to me since it doesn't clone the whole repo, it only unzip the required assests.

    The downside of that is that it breaks the bower philosophy since a bower update will not update bootstrap.

    But I think it's still cleaner than using bower install bootstrap and then building bootstrap in your workflow.

    It's a matter of choice I guess.

    Update : seems they now version a dist folder (see: https://github.com/twbs/bootstrap/pull/6342), so just use bower install bootstrap and point to the assets in the dist folder

提交回复
热议问题