Download
Soo deji Bootstrap si aad u hesho CSS-ga la soo ururiyey iyo JavaScript, koodka isha, ama ku dar maareeyayaasha xirmada aad jeceshahay sida npm, RubyGems, iyo in ka badan.
CSS iyo JS la soo ururiyey
Soo deji kood diyaarsan in la isticmaalo oo loogu talagalay Bootstrap v5.2.1 si aad si fudud ugu dhex gasho mashruucaaga, oo ay ku jiraan:
- Xidhmooyin CSS la soo ururiyey oo la yareeyey (eeg isbarbardhigga faylasha CSS )
- Isku-dubbaridyada JavaScript la soo ururiyey oo la yareeyey (eeg isbarbardhigga faylasha JS )
Tan kuma jiraan dukumeenti, faylasha isha, ama ku tiirsanaanta JavaScript kasta oo ikhtiyaari ah sida Popper.
Xigasho galalka
Ku soo ururi Bootstrap dhuumaha hantidaada adiga oo soo dejinaya ishayada Sass, JavaScript, iyo faylalka dukumentiga. Doorashadani waxay u baahan tahay qalab dheeraad ah:
- Sass compiler si loogu ururiyo faylalka isha Sass ee faylasha CSS
- Autoprefixer ee CSS horgalaha horgalayaasha
Haddii aad u baahato qalab-dhis oo dhamaystiran , waxay ku jiraan horumarinta Bootstrap iyo dukumeentiyadiisa, laakiin waxay u badan tahay inaanay ku habboonayn ujeedooyinkaaga.
Tusaalooyinka
Haddii aad rabto inaad soo dejiso oo aad eegto tusaalayaashayada , waxaad soo qaadan kartaa tusaalooyinkii hore loo dhisay:
CDN iyada oo loo marayo jsDelivr
Ku bood soo dejinta jsDelivr si aad u keento nooca kaydsan ee Bootstrap's CSS iyo JS ee mashruucaaga.
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
Haddii aad isticmaalayso JavaScript-kayaga la soo ururiyey oo aad door bidayso inaad ku darto Popper si gaar ah, ku dar Popper ka hor JS-keena, adigoo isticmaalaya CDN la doorbidayo.
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" crossorigin="anonymous"></script>
Maamulayaasha xirmada
U soo jiid faylalka isha Bootstrap ku dhawaad mashruuc kasta oo leh qaar ka mid ah maamulayaasha xirmooyinka ugu caansan. Dhib malaha maareeyaha xirmada, Bootstrap wuxuu u baahan doonaa sass compiler iyo Autoprefixer si loo habeeyo u dhigma noocyadayada rasmiga ah ee la soo ururiyey.
npm
Ku rakib Bootstrap abkaaga ku shaqeeya Node.js ee wata xirmada npm :
npm install [email protected]
const bootstrap = require('bootstrap')
ama import bootstrap from 'bootstrap'
waxay ku shubi doontaa dhammaan fiilooyinka Bootstrap bootstrap
shay. Qalabka bootstrap
laftiisa ayaa dhoofiya dhammaan pluginsyadayada. Waxaad si gaar ah gacanta ugu shuban kartaa Bootstrap's plugins adiga oo ku shubaya /js/dist/*.js
faylalka hoos yimaada tusaha heerka sare ee xirmada.
Bootstrap's package.json
wuxuu ka kooban yahay xog badan oo dheeraad ah oo hoos yimaada furayaashan:
sass
- Jidka Bootstrap's faylka isha ugu weyn ee Sassstyle
- Jidka loo maro Bootstrap's CSS-ka aan la yarayn ee la soo ururiyay iyadoo la adeegsanayo jaangooyooyinka caadiga ah (wax habayn ah ma jiro)
dunta
Ku rakib Bootstrap abkaaga ku shaqeeya Node.js ee wata xidhmada dunta :
yarn add [email protected]
RubyGems
Ku rakib Bootstrap abka Ruby adiga oo isticmaalaya Bundler ( lagu taliyay ) iyo RubyGems adiga oo ku daraya xariiqan soo socota kaaga Gemfile
:
gem 'bootstrap', '~> 5.2.1'
Haddii kale, haddii aadan isticmaalin Bundler, waxaad ku rakibi kartaa dhagaxa adiga oo socodsiinaya amarkan:
gem install bootstrap -v 5.2.1
Faahfaahin dheeraad ah ka eeg GEm's README
Laxanka
Waxa kale oo aad ku rakibi kartaa oo maamuli kartaa Bootstrap's Sass iyo JavaScript adoo isticmaalaya laxanka :
composer require twbs/bootstrap:5.2.1
NuGet
Haddii aad ku horumarto .NET Framework, waxaad sidoo kale ku rakibi kartaa oo maamuli kartaa Bootstrap's CSS ama Sass iyo JavaScript adoo isticmaalaya NuGet . Mashaariicda cusubi waa inay adeegsadaan libman ama hab kale maadaama NuGet loogu talagalay kood la soo ururiyey, ee maaha hantida hore.
Install-Package bootstrap
Install-Package bootstrap.sass