Landa
Landa i-Bootstrap ukuze uthole i-CSS ne-JavaScript ehlanganisiwe, ikhodi yomthombo, noma uyifake nabaphathi bakho bephakheji abayintandokazi njenge-npm, i-RubyGems, nokuningi.
I-CSS ehlanganisiwe ne-JS
Landa ikhodi ehlanganisiwe elungele ukusetshenziswa ye- Bootstrap v4.2.1 ukuze ungene kalula kuphrojekthi yakho, ehlanganisa:
- Izinqwaba ze-CSS ezihlanganisiwe nezincishisiwe (bona ukuqhathanisa kwamafayela e-CSS )
- Ama-plugin ahlanganisiwe futhi ancishisiwe e-JavaScript
Lokhu akubandakanyi amadokhumenti, amafayela omthombo, nanoma yikuphi ukuncika kwe-JavaScript ongakukhetha (i-jQuery ne-Popper.js).
Amafayela omthombo
Hlanganisa i-Bootstrap ngepayipi lakho lempahla ngokulanda umthombo wethu i-Sass, i-JavaScript, namafayela amadokhumenti. Le nketho idinga amathuluzi angeziwe:
- I-Sass compiler (i-Libsass noma i-Ruby Sass iyasekelwa) ukuze kuhlanganiswe i-CSS yakho.
- I- Autoprefixer yesiqalo somthengisi we-CSS
Uma kwenzeka udinga amathuluzi okwakha , afakwe ukuze kuthuthukiswe i-Bootstrap kanye nemibhalo yayo, kodwa cishe awafaneleki izinjongo zakho.
jsDelivr
Yeqa ukulanda nge- jsDelivr ukuze ulethe inguqulo efakwe kunqolobane ye-Bootstrap ehlanganisiwe ye-CSS kanye ne-JS kuphrojekthi yakho.
Uma usebenzisa i-JavaScript yethu ehlanganisiwe, ungakhohlwa ukufaka izinguqulo ze-CDN ze-jQuery ne-Popper.js ngaphambi kwayo.
Abaphathi bephakheji
Donsa amafayela womthombo we-Bootstrap cishe kunoma iyiphi iphrojekthi enabaphathi bephakheji abadume kakhulu. Kungakhathaliseki ukuthi ungumphathi wephakheji, i-Bootstrap izodinga i-Sass compiler kanye ne - Autoprefixer yokusetha okufana nezinguqulo zethu ezisemthethweni ezihlanganisiwe.
npm
Faka i-Bootstrap kuzinhlelo zakho zokusebenza ezinamandla ze-Node.js ngephakheji ye-npm :
require('bootstrap')
izolayisha wonke ama-plugin e-Bootstrap e-jQuery entweni ye-jQuery. Imojula bootstrap
ngokwayo ayikhiphi lutho. Ungakwazi ukulayisha mathupha ama-plugin e-Bootstrap e-jQuery ngawodwana ngokulayisha /js/*.js
amafayela ngaphansi kohla lwemibhalo lwezinga eliphezulu lephakheji.
I-Bootstrap's package.json
iqukethe imethadatha eyengeziwe ngaphansi kokhiye abalandelayo:
sass
- indlela eya kufayela lomthombo le -Bootstrap eliyinhloko le- Sassstyle
- indlela eya ku-CSS engancishisiwe ye-Bootstrap ehlanganiswe kusengaphambili kusetshenziswa izilungiselelo ezizenzakalelayo (akukho ukwenza ngokwezifiso)
ntambo
Faka i-Bootstrap kuzinhlelo zakho zokusebenza ezinamandla ze -Node.js ngephakheji yentambo :
I-RubyGems
Faka i-Bootstrap ezinhlelweni zakho zokusebenza ze-Ruby usebenzisa i - Bundler ( kunconyiwe ) kanye ne - RubyGems ngokwengeza umugqa olandelayo kweyakho Gemfile
:
Kungenjalo, uma ungasebenzisi i-Bundler, ungafaka igugu ngokusebenzisa lo myalo:
Bona igugu elithi README ukuze uthole imininingwane eyengeziwe.
Umqambi
Ungakwazi futhi ukufaka nokuphatha i-Bootstrap's Sass ne-JavaScript usebenzisa i- Composer :
I-NuGet
Uma uthuthuka ku-.NET, ungaphinda ufake futhi uphathe i-Bootstrap's CSS noma i - Sass ne-JavaScript usebenzisa i- NuGet :