Mafere na isi ọdịnaya Gaa na ntugharị docs
Check
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.2.1 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-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>

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

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 [email protected]

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 achịkọtara 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 :

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.2.1'

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

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

NuGet

Ọ bụrụ na ịmalite na .NET Framework, ị nwekwara ike ịwụnye ma jikwaa Bootstrap's CSS ma ọ bụ Sass na JavaScript site na iji NuGet . Ọrụ ndị ọhụrụ kwesịrị iji libman ma ọ bụ usoro ọzọ ka emebere NuGet maka koodu agbakọtara, ọ bụghị akụ n'ihu.

Install-Package bootstrap
Install-Package bootstrap.sass