Using bootstrap with bower

前端 未结 7 1771
無奈伤痛
無奈伤痛 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:35

    I ended up going with a shell script that you should only really have to run once when you first checkout a project

    #!/usr/bin/env bash
    
    mkdir -p webroot/js
    mkdir -p webroot/css
    mkdir -p webroot/css-min
    mkdir -p webroot/img
    mkdir -p webroot/font
    
    npm i
    bower i
    
    # boostrap
    pushd components/bootstrap
    npm i
    make bootstrap
    popd
    cp components/bootstrap/bootstrap/css/*.min.css webroot/css-min/
    cp components/bootstrap/bootstrap/js/bootstrap.js src/js/deps/
    cp components/bootstrap/bootstrap/img/* webroot/img/
    
    # fontawesome
    cp components/font-awesome/css/*.min.css webroot/css-min/
    cp components/font-awesome/font/* webroot/font/
    

提交回复
热议问题