Download
Dhawunirodha Bootstrap kuti utore yakaunganidzwa CSS uye JavaScript, kodhi kodhi, kana kuisanganisira neyako yaunofarira mapakeji mamaneja senge npm, RubyGems, nezvimwe.
Yakagadzirwa CSS uye JS
Dhawunirodha yakagadzirira-kushandisa-yakaunganidzwa kodhi yeBootstrap v4.6.2 kudonhedza nyore mupurojekiti yako, iyo inosanganisira:
- Yakaunganidzwa uye yakacheneswa CSS masumbu (ona CSS mafaira ekuenzanisa )
- Yakaunganidzwa uye yakagadziriswa JavaScript plugins (ona JS mafaira kuenzanisa )
Izvi hazvibatanidzi zvinyorwa, mafaera ekutanga, kana chero sarudzo yeJavaScript inotsamira (jQuery nePopper).
Source mafaira
Unganidza Bootstrap neako ega pombi pombi nekudhawunirodha yedu sosi Sass, JavaScript, uye zvinyorwa zvinyorwa. Iyi sarudzo inoda mamwe maturusi ekuwedzera:
- Sass compiler yekuunganidza Sass source mafaera muCSS mafaera
- Autoprefixer yeCSS mutengesi prefixing
Kana iwe ukada yedu yakazara seti yekuvaka maturusi , iwo anosanganisirwa kugadzira Bootstrap uye zvinyorwa zvayo, asi iwo anogona kunge asina kukodzera kune ako pachako zvinangwa.
Mienzaniso
Kana iwe uchida kudhawunirodha uye kuongorora yedu mienzaniso , unogona kubata iyo yakatovakwa mienzaniso:
jsDelivr
Svetuka kurodha nejsDelivr kuti uunze vhezheni yakachengetwa yeBootstrap yakaunganidzwa CSS neJS kupurojekiti yako.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
Kana iwe uri kushandisa yedu yakaunganidzwa JavaScript uye uchida kusanganisira Popper zvakasiyana, wedzera Popper pamberi peJS yedu, kuburikidza neCDN zviri nani.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
Package mamaneja
Dhonza muBootstrap's source mafaera mune ingangoita chero chirongwa chine mamwe anonyanya kufarirwa mapakeji maneja. Hazvina mhosva kuti maneja wepakeji, Bootstrap inoda Sass compiler uye Autoprefixer yekuseta inofanana neshanduro dzedu dzepamutemo dzakaunganidzwa.
npm
Isa Bootstrap mune yako Node.js powered apps ine npm package :
npm install bootstrap
require('bootstrap')
ichatakura ese Bootstrap's jQuery plugins pane jQuery chinhu. Iyo bootstrap
module pachayo haibudisi chero chinhu. Iwe unogona kurodha Bootstrap's jQuery plugins wega nekurodha mafaera /js/*.js
pasi pepakeji yepamusoro-level directory.
Bootstrap's package.json
ine imwezve metadata pasi pemakiyi anotevera:
sass
- nzira yeBootstrap's main Sass source filestyle
- nzira yeBootstrap's isina-minified CSS iyo yakagadziridzwa uchishandisa iyo default marongero (hapana kugadzirisa)
shinda
Isa Bootstrap mune yako Node.js powered apps ine yarn package :
yarn add bootstrap
RubyGems
Isa Bootstrap mumapurogiramu ako eRuby uchishandisa Bundler ( yakakurudzirwa ) uye RubyGems nekuwedzera mutsara unotevera kune yako Gemfile
:
gem 'bootstrap', '~> 4.6.2'
Neimwe nzira, kana usiri kushandisa Bundler, unogona kuisa iyo gem nekumhanyisa uyu murairo:
gem install bootstrap -v 4.6.2
Ona gem's README kuti uwane rumwe ruzivo.
Munyori
Iwe unogona zvakare kuisa nekugadzirisa Bootstrap's Sass uye JavaScript uchishandisa Composer :
composer require twbs/bootstrap:4.6.2
NuGet
Kana ukagadzira mu.NET, unogonawo kuisa nekugadzirisa Bootstrap's CSS kana Sass neJavaScript uchishandisa NuGet :
Install-Package bootstrap
Install-Package bootstrap.sass