Mafere na isi ọdịnaya Gaa na ntugharị docs
in English

Budata

Budata Bootstrap iji nweta CSS na Javascript achịkọtara, koodu isi mmalite, ma ọ bụ tinye ya na ndị njikwa ngwugwu ọkacha mmasị gị dị ka npm, RubyGems na ndị ọzọ.

Achịkọtara CSS na JS

Budata koodu achịkọtara ejikere maka Bootstrap v5.0.2 ka itinye ngwa ngwa n'ime ọrụ gị, nke gụnyere:

Nke a anaghị agụnye akwụkwọ, faịlụ isi mmalite, ma ọ bụ ihe ndabere Javascript nhọrọ ọ bụla dị ka Popper.

Budata

Isi mmalite faịlụ

Jiri pipeline akpaaka gị chịkọta Bootstrap site na nbudata isi iyi Sass, Javascript na faịlụ akwụkwọ. Nhọrọ a chọrọ ụfọdụ ngwa mgbakwunye:

Ọ bụrụ na ịchọrọ ngwa ọrụ nrụpụta anyị zuru oke, etinyere ha maka ịmepụta Bootstrap na docs ya, mana ha agaghị adabara ebumnuche nke gị.

Budata isi iyi

Ihe atụ

Ọ bụrụ na ịchọrọ ibudata ma nyochaa ihe atụ anyị , ị nwere ike ijide ihe atụ ndị arụrụlarị:

Budata Ihe Nlereanya

CDN site na jsDelivr

Jiri jsDelivr mafee nbudata ahụ iji wepụta ụdị cache nke Bootstrap chịkọtara CSS na JS n'ọrụ gị.

<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

Ọ bụrụ na ị na-eji Javascript anyị achịkọtara wee họrọ ịgụnye Popper iche, tinye Popper n'ihu JS anyị, site na CDN ọkachamma.

<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>

Ndị njikwa ngwugwu

Weghachite faịlụ isi mmalite Bootstrap n'ime ihe fọrọ nke nta ka ọ bụrụ ọrụ ọ bụla nwere ụfọdụ njikwa ngwugwu kachasị ewu ewu. N'agbanyeghị onye njikwa ngwugwu, Bootstrap ga- achọ Sass compiler na Autoprefixer maka nhazi nke dabara na ụdị anyị achịkọtara.

npm

Wụnye Bootstrap na ngwa Node.js gị nwere ngwugwu npm :

npm install bootstrap

const bootstrap = require('bootstrap')ma ọ bụ import bootstrap from 'bootstrap'ga-ebunye ihe mgbakwunye Bootstrap niile n'ime bootstrapihe. Modul n'onwe ya na bootstrap-ebupụ plugins anyị niile. Ị nwere ike iji aka buo plugins Bootstrap n'otu n'otu site na ịkwanye /js/dist/*.jsfaịlụ ndị dị n'okpuru akwụkwọ ndekọ aha kachasị elu nke ngwugwu.

Bootstrap package.jsonnwere ụfọdụ metadata agbakwunyere n'okpuru igodo ndị a:

  • sass- ụzọ isi Bootstrap isi faịlụ Sass
  • style- ụzọ na-aga Bootstrap CSS na-abụghị nke a chịkọtara nke ọma site na iji ntọala ndabara (enweghị nhazi)
Bido na Bootstrap site na npm site na iji ọrụ mmalite anyị! Gaba na twbs/bootstrap-npm-starter template repository ịhụ ka esi ewu na hazie Bootstrap n'ime ọrụ npm nke gị. Gụnyere Sass compiler, Autoprefixer, Stylelint, PurgeCSS, na Bootstrap Icons.

yarn

Wụnye Bootstrap na ngwa Node.js gị na ngwugwu yarn :

yarn add bootstrap

RubyGems

Wụnye Bootstrap na ngwa Ruby gị site na iji Bundler ( akwadoro ) na RubyGems site na ịgbakwunye ahịrị ndị a na gị Gemfile:

gem 'bootstrap', '~> 5.0.2'

N'aka nke ọzọ, ọ bụrụ na ị naghị eji Bundler, ị nwere ike ịwụnye gem site na iji iwu a:

gem install bootstrap -v 5.0.2

Hụ ọnụ ahịa README maka nkọwa ndị ọzọ.

Onye na-ede ihe

Ị nwekwara ike iwunye ma jikwaa Bootstrap's Sass na JavaScript site na iji Onye na-ede ihe :

composer require twbs/bootstrap:5.0.2

NuGet

Ọ bụrụ na ịmalite na NET, ị nwekwara ike ịwụnye ma jikwaa Bootstrap's CSS ma ọ bụ Sass na JavaScript site na iji NuGet :

Install-Package bootstrap
Install-Package bootstrap.sass