바우어와 함께 부트 스트랩 사용
bower와 함께 부트 스트랩을 사용하려고하지만 전체 저장소를 복제하기 때문에 CSS 및 기타 항목이 없습니다.
자체 빌드 프로세스에 부트 스트랩 빌드를 포함시켜야합니까? 아니면 내가 틀렸다면 올바른 워크 플로는 무엇입니까?
마침내 다음을 사용하여 끝났습니다. bower install --save http://twitter.github.com/bootstrap/assets/bootstrap.zip
그것이 전체 저장소를 복제하지 않기 때문에 나에게 더 깨끗한 것 같습니다. 필요한 의견을 풀어야합니다.
그것의 단점은 bower update부트 스트랩을 업데이트하지 않기 때문에 bower 철학을 위반한다는 것 입니다.
그러나 bower install bootstrap워크 플로우에서 부트 스트랩을 사용한 다음 빌드하는 것보다 여전히 깨끗하다고 생각합니다 .
내가 선택하는 것은 선택의 문제입니다.
업데이트 : 이제 dist 폴더의 버전을 확인한 것 같습니다 ( https://github.com/twbs/bootstrap/pull/6342 참조 ) 폴더 bower install bootstrap의 자산을 사용 하고 가리 키십시오.dist
bootstrap-css라는 사전 빌드 된 부트 스트랩 바우어 패키지가 있습니다. 나는 이것이 당신과 내가 찾고자하는 것이라고 생각합니다.
bower install bootstrap-css
고마워 니코
css 및 js 파일은 패키지 내에 있습니다. bootstrap/docs/assets/
최신 정보:
v3부터는 dist모든 CSS, js 및 글꼴을 포함 하는 폴더가 패키지에 있습니다.
다른 옵션 (단일 파일 만 가져 오려는 경우)은 pulldown 입니다. 구성은 매우 간단하며 자신의 파일 / URL을 목록에 쉽게 추가 할 수 있습니다.
전 세계에 npm을 설치하고 bower를 설치했다고 가정합니다.
- 프로젝트로 이동
bower init(이것은 디렉토리에 bower.json 파일을 생성합니다)- (예를 계속 클릭하십시오) ...
부트 스트랩이 설치 될 경로를 설정하려면 : bower.json 파일 옆에 파일을
수동으로 작성하고.bowerrc다음을 추가하십시오.{ "directory": "public / components"}
bower install bootstrap --save
참고 : 다른 구성 요소를 설치하려면 다음을 수행하십시오.
bower search {component-name-here}
프로젝트를 처음 체크 아웃 할 때 실제로 한 번만 실행하면되는 쉘 스크립트로 끝났습니다.
#!/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/
또한 다음과 같은 명령으로 기억하십시오 :
bower search twitter
트위터와 관련된 패키지 목록으로 결과를 얻습니다. 이렇게하면 새로운 bower 구성 요소가 있는지 아는 것과 같이 Twitter 및 Bower에 관한 모든 최신 정보를 얻을 수 있습니다.
You have install nodeJs on your system in order to execute npm commands. Once npm is properly working you can visit bower.io. There you will find complete documentation on this topic. You will find a command $ npm install bower. this will install bower on your machine. After installing bower you can install Bootstrap easily.
Here is a video tutorial on that
참고URL : https://stackoverflow.com/questions/14450408/using-bootstrap-with-bower
'IT박스' 카테고리의 다른 글
| Git은 왜 암호화 해시 기능을 사용합니까? (0) | 2020.06.25 |
|---|---|
| github의 상호 참조 커밋 (0) | 2020.06.25 |
| 평평한 구조에서 효율적으로 나무를 만드는 법? (0) | 2020.06.25 |
| Eclipse 컴파일 오류 : '클래스 이름'유형의 계층 구조가 일치하지 않습니다 (0) | 2020.06.25 |
| 목표 -C : 파일을 한 줄씩 읽기 (0) | 2020.06.24 |