Jya ku bintu nyamukuru Jya kuri docs
Check
in English

Kuramo

Kuramo Bootstrap kugirango ubone CSS na JavaScript yakusanyijwe, code yinkomoko, cyangwa uyishyire hamwe nabashinzwe gucunga pake ukunda nka npm, RubyGems, nibindi byinshi.

Byakusanyije CSS na JS

Kuramo biteguye-gukoresha-kode yakozwe kuri Bootstrap v5.2.1 kugirango ugabanuke byoroshye mumushinga wawe, urimo:

Ibi ntabwo bikubiyemo inyandiko, amadosiye yinkomoko, cyangwa JavaScript itabishaka nka Popper.

Kuramo

Amadosiye

Gukusanya Bootstrap hamwe numuyoboro wawe bwite ukuramo isoko Sass, JavaScript, hamwe namadosiye yinyandiko. Ihitamo risaba ibikoresho byinyongera:

Ugomba gukenera ibikoresho byuzuye byubaka , zirimo guteza imbere Bootstrap hamwe na doc zayo, ariko birashoboka ko bidakwiriye intego zawe.

Gukuramo isoko

Ingero

Niba ushaka gukuramo no gusuzuma ingero zacu , urashobora gufata ingero zimaze kubakwa:

Kuramo Ingero

CDN ikoresheje jsDelivr

Kureka gukuramo hamwe na jsDelivr kugirango utange verisiyo ya cashe ya Bootstrap yakozwe CSS na JS kumushinga wawe.

<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>

Niba ukoresha JavaScript yacu yakozwe hanyuma ugahitamo gushyiramo Popper ukwayo, ongeramo Popper mbere ya JS yacu, ukoresheje CDN nibyiza.

<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>

Abashinzwe gupakira

Kurura muri dosiye ya Bootstrap hafi yumushinga uwo ariwo wose hamwe nabayobozi benshi bazwi cyane. Ntakibazo umuyobozi ushinzwe paki, Bootstrap izakenera Sass compiler na Autoprefixer kugirango ushyire hamwe na verisiyo yemewe yatunganijwe.

npm

Shyira Bootstrap muri Node.js ikoresha porogaramu hamwe na pake ya npm :

npm install [email protected]

const bootstrap = require('bootstrap')cyangwa import bootstrap from 'bootstrap'izapakira amacomeka ya Bootstrap yose kubintu bootstrap. Module bootstrapubwayo yohereza ibicuruzwa byacu byose. Urashobora kwikorera intoki amacomeka ya Bootstrap kugiti cyawe ukuramo /js/dist/*.jsdosiye munsi yububiko bwurwego rwo hejuru.

Bootstrap package.jsonirimo metadata yinyongera munsi yimfunguzo zikurikira:

  • sass- inzira kuri Bootstrap nyamukuru ya Sass isoko ya dosiye
  • style- inzira igana Bootstrap ya CSS idacukuwe CSS yakozwe hakoreshejwe igenamiterere risanzwe (nta kwihindura)
Tangira na Bootstrap ukoresheje npm hamwe numushinga utangira! Kujya kuri twbs / bootstrap-npm-itangira inyandikorugero yububiko kugirango urebe uko wubaka no gutunganya Bootstrap mumushinga wawe bwite wa npm. Harimo icyegeranyo cya Sass, Autoprefixer, Stylelint, PurgeCSS, na Bootstrap Udushushondanga.

yarn

Shyira Bootstrap muri Node.js ikoresha porogaramu hamwe nudupapuro twiza :

RubyGems

Shyira Bootstrap muri porogaramu zawe za Ruby ukoresheje Bundler ( bisabwa ) na RubyGems wongeyeho umurongo ukurikira kuri Gemfile:

gem 'bootstrap', '~> 5.2.1'

Ubundi, niba udakoresha Bundler, urashobora gushiraho amabuye y'agaciro ukoresheje iri tegeko:

gem install bootstrap -v 5.2.1

Reba ibisobanuro by'amabuye y'agaciro kugirango ubone ibisobanuro birambuye.

Uwayihimbye

Urashobora kandi kwinjizamo no gucunga Sass ya Bootstrap na JavaScript ukoresheje Composer :

composer require twbs/bootstrap:5.2.1

NuGet

Niba utezimbere muri .NET Framework, urashobora kandi kwinjizamo no gucunga CSS ya Bootstrap cyangwa Sass na JavaScript ukoresheje NuGet . Imishinga mishya igomba gukoresha libman cyangwa ubundi buryo nkuko NuGet yagenewe code yakusanyijwe, ntabwo umutungo wimbere.

Install-Package bootstrap
Install-Package bootstrap.sass