Khuphela
Khuphela i-Bootstrap ukuze ufumane i-CSS ehlanganisiweyo kunye neJavaScript, ikhowudi yomthombo, okanye uyifake kunye nabaphathi bephakheji obathandayo njenge-npm, i-RubyGems, kunye nokunye.
I-CSS ehlanganisiweyo kunye ne-JS
Khuphela ikhowudi esele ilungele ukusetyenziswa yeBootstrap v4.4.1 ukuze uwele ngokulula kwiprojekthi yakho, ebandakanya:
- Imiqulu yeCSS ehlanganisiweyo kunye nencitshisiweyo (jonga uthelekiso lweefayile zeCSS )
- Iiplagi zeJavaScript ezihlanganisiweyo nezincitshisiweyo
Oku akubandakanyi uxwebhu, iifayile zemvelaphi, okanye naziphi na izixhomekeke kwiJavaScript ekhethiweyo (jQuery kunye nePopper.js).
Iifayile zomthombo
Qokelela i-Bootstrap kunye nombhobho we-asethi yakho ngokukhuphela umthombo wethu we-Sass, iJavaScript, kunye neefayile zamaxwebhu. Olu khetho lufuna isixhobo esongezelelweyo:
- Umqokeleli weSass (iLibsass okanye iRuby Sass iyaxhaswa) ukuze uqulunqe iCSS yakho.
- I- Autoprefixer ye-CSS yomthengisi isimaphambili
Ukuba ufuna izixhobo zokwakha , zibandakanyiwe ekuphuhliseni i-Bootstrap kunye nee-docs zayo, kodwa azifanelanga iinjongo zakho.
jsDelivr
Tsiba ukhuphelo ngejsDelivr ukuhambisa uguqulelo olugciniweyo lweBootstrap eqokelelweyo yeCSS kunye neJS kwiprojekthi yakho.
Ukuba usebenzisa iJavaScript yethu eqokelelweyo, ungalibali ukubandakanya iinguqulelo zeCDN zejQuery kunye nePopper.js phambi kwayo.
Abaphathi bephakheji
Tsala iifayile zomthombo weBootstrap phantse kuyo nayiphi na iprojekthi enabaphathi bephakheji abadumileyo. Kungakhathaliseki ukuba umphathi wephakheji, i-Bootstrap iya kufuna i-Sass compiler kunye ne - Autoprefixer yokuseta oluhambelana neenguqulelo zethu ezisemthethweni ezihlanganisiweyo.
npm
Faka i-Bootstrap kwi-apps yakho ye-Node.js ene -npm package :
require('bootstrap')
izakulayisha zonke iiplagi zeBootstrap zejQuery kwinto yejQuery. Imodyuli bootstrap
ngokwayo ayithumeleli nantoni na. Uyakwazi ukulayisha ngesandla iiplagi ze-Bootstrap zejQuery nganye ngokulayisha /js/*.js
iifayile phantsi kolawulo lomgangatho ophezulu wephakheji.
I-Bootstrap's package.json
iqulethe i-metadata eyongezelelweyo phantsi kwezi zitshixo zilandelayo:
sass
- indlela eya kwiBootstrap eyona fayile yomthombo weSassstyle
-indlela eya kwi-Bootstrap's non-minified CSS esele ihlanganiswe kusetyenziswa useto olungagqibekanga (akukho ngokwezifiso)
umsonto
Faka i-Bootstrap kwi-Node.js usetyenziso olunikwe amandla ngepakethi yomsonto :
RubyGems
Faka iBootstrap kwii -apps zakho zeRuby usebenzisa iBundler ( iyacetyiswa ) kunye neRubyGems ngokongeza lo mgca ulandelayo kweyakho Gemfile
:
Kungenjalo, ukuba awusebenzisi i-Bundler, ungafaka i-gem ngokusebenzisa lo myalelo:
Jonga gem's FUNDA ngeenkcukacha ezithe vetshe.
Umqambi
Unokufaka kwaye ulawule iSass yeBootstrap kunye neJavaScript usebenzisa uMqambi :
NuGet
Ukuba uphuhlisa kwi.NET, ungafaka kwaye ulawule iBootstrap's CSS okanye iSass kunye neJavaScript usebenzisa i- NuGet :