Tɛmɛn ka taa kunnafoni kunbabaw la Tɛmɛn ka taa docs navigation kan
Check
in English

Ka telesarize

Bootstrap telesarse walasa ka CSS ni JavaScript lajɛlenw sɔrɔ, source code, walima k’a don i ka pake ɲɛmɔgɔw la minnu ka di i ye i n’a fɔ npm, RubyGems ani dɔ wɛrɛw.

CSS ni JS labɛnna

Bootstrap v5.2.1 ka kode labɛnnenw telesarse walasa ka don nɔgɔya la i ka poroze kɔnɔ, o min kɔnɔ:

O tɛ sɛbɛnw, source files, walima JavaScript dependencies optionnels si la i n’a fɔ Popper.

Ka telesarize

Source files (Filɛriw sɔrɔyɔrɔ).

Bootstrap labɛn ni i yɛrɛ ka nafolo pipeline ye i kɛtɔ ka an ka source Sass, JavaScript ani documentation files telesarse. Nin sugandi in bɛ baarakɛminɛn wɛrɛw de wajibiya:

  • Sass compiler min bɛ Sass source filew lajɛ ka kɛ CSS filew ye
  • Autoprefixer ka ɲɛsin CSS feerekɛlaw ka ɲɛfɔlisenw ma

Ni aw ka kan k’an ka jɔli baarakɛminɛnw bɛɛ ɲini , u bɛ sɔrɔ Bootstrap n’a sɛbɛnw labɛnni kama, nka a ka c’a la u tɛ bɛn i yɛrɛ ka kuntilenna ma.

Télécharger source

Misaliw

N’i ​​b’a fɛ k’an ka misaliw telesarse ani k’u sɛgɛsɛgɛ , i bɛ se ka misali jɔlenw minɛ kaban:

Misaliw telesarse

CDN ka tɛmɛ jsDelivr fɛ

Tɛmɛn telesarseli kan ni jsDelivr ye walasa ka Bootstrap ka CSS ni JS lajɛlenw ka caché version lase i ka poroze ma.

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

N'i bɛ baara Kɛ ni an ka JavaScript lajɛlen ye ani n'i b'a fɛ ka Popper Dòn a dan na, i ka Popper Fàra an ka JS kan, CDN fɛ a ka fisa.

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

Pake ɲɛmɔgɔw

Bootstrap ka source files sama ka don porozɛ suguya bɛɛ la ni pake ɲɛmɔgɔ dɔw ye minnu ka di kosɛbɛ. Foroko ɲɛnabɔbaga mana kɛ min o min ye, Bootstrap bɛna Sass daɲɛgafe ni Autoprefixer de wajibiya walasa ka sigicogo dɔ sɔrɔ min bɛ bɛn an ka daɲɛw labɛncogo ofisiyaliw ma.

npm ye

Bootstrap in sigi i ka Node.js baarakɛminɛnw kɔnɔ ni npm pake ye :

npm install [email protected]

const bootstrap = require('bootstrap')walima import bootstrap from 'bootstrap'a bɛna Bootstrap ka plugins bɛɛ doni bootstrapfɛn dɔ kan. Module bootstrapyɛrɛ bɛ an ka plugins bɛɛ Bɔ kɛnɛ kan. I bɛ Se ka Bootstrap ka 'pluginw Lase i bolo fɛ kelen-kelen ni i ye /js/dist/*.jsdosiyew Lase pake ka sanfɛla-dakun 'kɔnɔ.

Bootstrap's package.jsonkɔnɔ, metadata wɛrɛw bɛ yen minnu bɛ nin kilisi ninnu jukɔrɔ:

  • sass- sira min bɛ taa Bootstrap ka Sass source fileba la
  • style- sira min bɛ taa Bootstrap ka CSS min ma dɔgɔya min labɛnna ni sigicogo kɔrɔw ye (labɛnni tɛ kɛ) .
Aw ye Bootstrap daminɛ npm fɛ ni an ka daminɛ porozɛ ye! Aw bɛ taa twbs/bootstrap-npm-starter jatebɔyɔrɔ la walasa ka Bootstrap jɔcogo n’a labɛncogo lajɛ aw yɛrɛ ka npm porozɛ kɔnɔ. Sass daɲɛgafe, Autoprefixer, Stylelint, PurgeCSS ani Bootstrap Icons bɛ yen.

jirisun

Bootstrap in sigi i ka Node.js baarakɛminɛnw kɔnɔ ni jiri pake ye :

RubyGems ye

Bootstrap sigi i ka Ruby porogaramuw kɔnɔ ni Bundler ( ladilikan ) ani RubyGems ye i kɛtɔ ka nin zana in fara i ka Gemfile:

gem 'bootstrap', '~> 5.2.1'

O cogo kelen na, n’i tɛ Bundler baara, i bɛ se ka gem in sigi ni nin cikan in ye:

gem install bootstrap -v 5.2.1

Aw ye gem ka README lajɛ walasa ka kunnafoni wɛrɛw sɔrɔ.

Dɔnkilidala

Aw bɛ se fana ka Bootstrap ka Sass ni JavaScript sigi ani k’u ɲɛnabɔ ni Composer ye :

composer require twbs/bootstrap:5.2.1

NuGet ye

N’i ​​ye yiriwa .NET Framework kɔnɔ, i bɛ se fana ka Bootstrap ka CSS walima Sass ani JavaScript sigi ani k’a ɲɛnabɔ ni NuGet ye. Porozɛ kuraw ka kan ka baara kɛ ni libman walima fɛɛrɛ wɛrɛ ye bawo NuGet dabɔra kode lajɛlenw kama, a tɛ frontend nafolomafɛnw ye.

Install-Package bootstrap
Install-Package bootstrap.sass