twitter bootstrap make from source

后端 未结 5 1117
醉酒成梦
醉酒成梦 2020-12-15 10:51

So I am trying to \"build\" twitter bootstrap from source git://github.com/twitter/bootstrap.git and I git clone it to my local machine.

Obviously, on my local machi

5条回答
  •  清歌不尽
    2020-12-15 11:23

    Not an expert on this by any stretch of the imagination (just started to play around with Twitter bootstrap as well), but I get a similar output as you when I just run make. However, if you run make bootstrap it generates a folder entitled bootstrap that contains the compiled css as far as I can tell:

    make bootstrap
    mkdir -p bootstrap/img
    mkdir -p bootstrap/css
    mkdir -p bootstrap/js
    cp img/* bootstrap/img/
    lessc ./less/bootstrap.less > bootstrap/css/bootstrap.css
    lessc --compress ./less/bootstrap.less > bootstrap/css/bootstrap.min.css
    lessc ./less/responsive.less > bootstrap/css/bootstrap-responsive.css
    lessc --compress ./less/responsive.less > bootstrap/css/bootstrap-responsive.min.css
    cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js > bootstrap/js/bootstrap.js
    uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.js
    

    The new bootstrap directory (bootstrap/bootstrap) contains the following:

    bootstrap/css:
    - bootstrap-responsive.css
    - bootstrap-responsive.min.css
    - bootstrap.css
    - bootstrap.min.css
    
    bootstrap/img:
    - glyphicons-halflings-white.png
    - glyphicons-halflings.png
    
    bootstrap/js:
    - bootstrap.js
    - bootstrap.min.js
    

    This might be an issue with the documentation, leaving out the correct command, but I'm not sure. My memory of how a Makefile works is if you issue make without a target, it defaults to the first target in the makefile. In this case, that target is docs instead of bootstrap.

    I think you can then just copy the contents of the new bootstrap directory to wherever you would normally put the css/js assets for your project.

提交回复
热议问题