Bower: Installing legacy bootstrap (2.3.2) with bower

一世执手 提交于 2019-12-04 08:43:35

You are doing everything correct. Take a look at the README for v2.3.2 on github

Bootstrap includes a makefile with convenient methods for working with the framework. Before getting started, be sure to install the necessary local dependencies:

$ npm install When completed, you'll be able to run the various make commands provided:

build - make

Runs the recess compiler to rebuild the /less files and compiles the docs. Requires recess and uglify-js.

test - make test

Runs jshint and qunit tests headlessly in phantomjs (used for ci). Depends on having phantomjs installed.

watch - make watch

The solution I ended up with: forked bootstrap repo, cleaned up(other branches etc..) git reset --hard to the v2.3.2 tag - checked it into another branch and pushe it to github. more cleanup (removing the old master branch, higher tags). run the build processes and setup an "updated" dist folder for the v2.3.2 tag. changed the bower package and published it as bootstrap2.3.2 package.

Now I (and everyone else) can install with bower install from this repo. The results are here if someone want to use it.

I just ran into this and was basically setting up my own fork of Bootstrap 2.3.2 (before I noticed your answer). As I dove in, I noticed that Bootstrap 2.3.2 actually does come with pre-built assets you can use in your project. While it's not as obvious as the dist/ directory in Bootstrap 3, you can find the location of the prebuilt assets in the project's bower.json:

"main": ["./docs/assets/js/bootstrap.js", "./docs/assets/css/bootstrap.css"],

So there you go. Add {"bootstrap": "~2.3.2"} to your bower.json dependencies like you normally would, then use it like this:

<link href="bower_components/bootstrap/docs/assets/css/bootstrap.css" rel="stylesheet">
<script src="bower_components/bootstrap/docs/assets/js/bootstrap.js"></script>

No build step required.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!