How to install Bootstrap v4 alpha using bower? [du

2019-06-17 09:24发布

问题:

This question already has an answer here:

  • Installing Bootstrap 4 with bower 4 answers

The v4-alpha documentation states

Bootstrap v4.0.0-alpha is available for download in several ways, including some of your favorite package managers.

however, the mentioned

bower install bootstrap

installs the latest stable release 3.3.5 instead.

How to install v4 alpha using bower?

回答1:

To install a specific version, append the GitHub tag using #:

bower install bootstrap#4.0.0-alpha


回答2:

Adding "bootstrap": "4.0" to the bower.json file under dependencies and running bower install in the terminal did it for me. Naturally, if you're using Yeoman and opt-in for the Bootstrap option, you'll want to remove the bootstrap folder under the bower_components folder.