Kuramo
Kuramo Bootstrap kugirango ubone CSS na JavaScript yakusanyijwe, code yinkomoko, cyangwa uyishyire hamwe nabashinzwe gucunga pake ukunda nka npm, RubyGems, nibindi byinshi.
Kuramo biteguye-gukoresha-kode yakozwe kuri Bootstrap v4.0.0 kugirango igabanuke byoroshye mumushinga wawe, urimo:
- Gukusanya no kugabanya CSS bundles (reba dosiye ya CSS igereranya )
- Gukusanya no kugabanya amacomeka ya JavaScript
Ibi ntabwo bikubiyemo inyandiko, amadosiye yinkomoko, cyangwa JavaScript itabishaka (jQuery na Popper.js).
Gukusanya Bootstrap hamwe numuyoboro wawe bwite ukuramo isoko Sass, JavaScript, hamwe namadosiye yinyandiko. Ihitamo risaba ibikoresho byinyongera:
- Gukusanya Sass (Libsass cyangwa Ruby Sass irashyigikiwe) mugukusanya CSS yawe.
- Autoprefixer kubucuruzi bwa CSS ibanziriza
Ukeneye ibikoresho byubaka , birashyizwe mugutezimbere Bootstrap hamwe na docs, ariko birashoboka ko bidakwiriye intego zawe.
Kureka gukuramo hamwe na jsDelivr kugirango utange verisiyo ya cashe ya Bootstrap yakozwe CSS na JS kumushinga wawe.
Niba ukoresha JavaScript yacu yakozwe, ntuzibagirwe gushyiramo CDN verisiyo ya jQuery na Popper.js mbere yayo.
Kurura muri dosiye ya Bootstrap mumasoko hafi ya yose hamwe nabamwe mubayobozi bazwi cyane. Ntakibazo umuyobozi ushinzwe paki, Bootstrap izakenera Sass compiler na Autoprefixer kugirango dushyire hamwe duhuza verisiyo yemewe.
Shyira Bootstrap muri Node.js ikoresha porogaramu hamwe na pake ya npm :
require('bootstrap')
izashyira amacomeka ya jQuery yose ya Bootstrap kubintu bya jQuery. Module bootstrap
ubwayo ntacyo yohereza hanze. Urashobora kwipakurura intoki za jQuery ya Bootstrap kugiti cyawe ukuramo /js/*.js
dosiye munsi yububiko bwa top-level.
Bootstrap package.json
irimo metadata yinyongera munsi yimfunguzo zikurikira:
sass
- inzira kuri Bootstrap nyamukuru ya Sass isoko ya dosiyestyle
- inzira igana Bootstrap ya CSS idacukuwe CSS yabanjirijwe hakoreshejwe igenamiterere risanzwe (nta kwihindura)
Shyira Bootstrap muri porogaramu zawe za Ruby ukoresheje Bundler ( bisabwa ) na RubyGems wongeyeho umurongo ukurikira kuri Gemfile
:
Ubundi, niba udakoresha Bundler, urashobora gushiraho amabuye y'agaciro ukoresheje iri tegeko:
Reba ibisobanuro by'amabuye y'agaciro kugirango ubone ibisobanuro birambuye.
Urashobora kandi kwinjizamo no gucunga Sass ya Bootstrap na JavaScript ukoresheje Composer :
Niba utezimbere muri .NET, urashobora kandi kwinjizamo no gucunga CSS ya Bootstrap cyangwa Sass na JavaScript ukoresheje NuGet :