Okufuna
Wano wefunire Bootstrap okufuna CSS ne JavaScript ezikung’aanyiziddwa, source code, oba okugiteekamu n’abaddukanya package bo abasinga okwagala nga npm, RubyGems, n’ebirala.
Yakungaanya CSS ne JS
Wano wefunire code ekunganyiziddwa eyeetegefu okukozesebwa eya Bootstrap v4.6.2 okusobola okwanguyirwa okugwa mu pulojekiti yo, nga muno mulimu:
- Ebibinja bya CSS ebikuŋŋaanyiziddwa era ebikendeezeddwa (laba okugeraageranya fayiro za CSS ) .
- Ebiyungo bya JavaScript ebikuŋŋaanyiziddwa era ne bikendeezebwa (laba okugeraageranya fayiro za JS ) .
Kino tekirimu biwandiiko, fayiro z'ensibuko, oba okwesigamizibwa kwonna okwa JavaScript okw'okwesalirawo (jQuery ne Popper).
Fayiro z’ensibuko
Kuŋŋaanya Bootstrap ne payipu yo ey'eby'obugagga ng'owanula fayiro zaffe ez'ensibuko Sass, JavaScript, ne fayiro z'ebiwandiiko. Enkola eno yeetaaga ebikozesebwa ebirala:
- Sass compiler okukuŋŋaanya fayiro za Sass ensibuko mu fayiro za CSS
- Autoprefixer ku ntandikwa y'omutunzi wa CSS
Should you require our full set of build tools , ziteekeddwamu okukola Bootstrap ne docs zaayo, naye ziyinza okuba nga tezisaanira bigendererwa byo.
Eby’okulabirako
Bw’oba oyagala okuwanula n’okwekenneenya ebyokulabirako byaffe , osobola okukwata ebyokulabirako ebyazimbibwa edda:
jsDelivr nga bwe kiri
Buuka okuwanula ne jsDelivr okutuusa enkyusa eterekeddwa eya Bootstrap's compiled CSS ne JS ku pulojekiti yo.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
Bw’oba okozesa JavaScript yaffe ekung’aanyiziddwa era ng’oyagala okussaamu Popper okwawukana, yongerako Popper nga JS yaffe tennabaawo, ng’oyita mu CDN okusinga.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
Abaddukanya ebipapula
Sika fayiro za Bootstrap ez'ensibuko kumpi mu pulojekiti yonna n'abamu ku baddukanya package abasinga okwettanirwa. Si nsonga muddukanya package, Bootstrap ejja kwetaaga Sass compiler ne Autoprefixer ku setup ekwatagana n'enkyusa zaffe entongole ezikung'aanyiziddwa.
npm
Teeka Bootstrap mu pulogulaamu zo ezikozesa Node.js nga olina npm package :
npm install bootstrap
require('bootstrap')
ejja kutikka byonna ebya Bootstrap ebya jQuery ku kintu kya jQuery. Module bootstrap
yennyini tefulumya kintu kyonna. Osobola okutikka mu ngalo ebikozesebwa bya Bootstrap ebya jQuery kinnoomu ng'otikka /js/*.js
fayiro wansi wa dayirekita y'omutendera ogw'oku ntikko ogw'ekipapula.
Bootstrap's package.json
erimu metadata endala wansi w'ebisumuluzo bino wammanga:
sass
- ekkubo erigenda mu fayiro enkulu eya Sass ensibuko ya Bootstrapstyle
- ekkubo erigenda ku CSS ya Bootstrap etakendeezeddwa ebadde ekuŋŋaanyiziddwa nga ekozesa ensengeka ezisookerwako (tewali kulongoosa)
wuzi
Teeka Bootstrap mu pulogulaamu zo ezikozesa Node.js n'ekipapula ky'obuwuzi :
yarn add bootstrap
RubyGems nga bwe kiri
Teeka Bootstrap mu pulogulaamu zo eza Ruby ng'okozesa Bundler ( esengekeddwa ) ne RubyGems ng'ogattako layini eno wammanga ku yo Gemfile
:
gem 'bootstrap', '~> 4.6.2'
Ekirala, bw’oba tokozesa Bundler, osobola okuteeka gem ng’okola ekiragiro kino:
gem install bootstrap -v 4.6.2
Laba README ya gem eno okumanya ebisingawo.
Omuyimbi
Osobola n'okuteeka n'okuddukanya Sass ne JavaScript za Bootstrap ng'okozesa Composer :
composer require twbs/bootstrap:4.6.2
NuGet nga bwe kiri
Bw’oba okulaakulanya mu .NET, osobola n’okuteeka n’okuddukanya CSS ya Bootstrap oba Sass ne JavaScript ng’okozesa NuGet :
Install-Package bootstrap
Install-Package bootstrap.sass