Zazzagewa
Zazzage Bootstrap don samun haɗin CSS da JavaScript, lambar tushe, ko haɗa shi tare da manajojin fakitin da kuka fi so kamar npm, RubyGems, da ƙari.
Haɗa CSS da JS
Zazzage lambar da aka shirya don amfani don Bootstrap v4.4.1 don saukewa cikin sauƙi cikin aikinku, wanda ya haɗa da:
- Haɗe-haɗe da ƙananan gungun CSS (duba kwatancen fayilolin CSS )
- Haɗaɗɗen plugins na JavaScript
Wannan baya haɗa da takardu, fayilolin tushe, ko kowane abin dogaro na JavaScript na zaɓi (jQuery da Popper.js).
Fayilolin tushen
Haɗa Bootstrap tare da bututun kadari ta hanyar zazzage tushen mu Sass, JavaScript, da fayilolin takardu. Wannan zaɓin yana buƙatar ƙarin kayan aiki:
- Sass compiler (Libsass ko Ruby Sass ana goyan bayan) don haɗa CSS ɗin ku.
- Autoprefixer don prefixer mai siyar da CSS
Idan kuna buƙatar kayan aikin ginawa , an haɗa su don haɓaka Bootstrap da takaddun sa, amma wataƙila ba su dace da manufofin ku ba.
jsDelivr
Tsallake zazzagewar tare da jsDelivr don isar da sigar cache na Bootstrap's harhada CSS da JS zuwa aikinku.
Idan kuna amfani da JavaScript ɗinmu da aka haɗa, kar ku manta da haɗa nau'ikan CDN na jQuery da Popper.js kafinsa.
Manajan kunshin
Ja fayilolin tushen Bootstrap zuwa kusan kowane aiki tare da wasu shahararrun manajan fakitin. Komai manajan fakitin, Bootstrap zai buƙaci mai tara Sass da Autoprefixer don saitin da ya dace da nau'ikan mu na hukuma.
npm
Shigar da Bootstrap a cikin ayyukan Node.js masu ƙarfi tare da fakitin npm :
require('bootstrap')
za ta loda duk abubuwan jQuery na Bootstrap akan abin jQuery. Shi bootstrap
kansa tsarin ba ya fitar da komai. Kuna iya loda plugins jQuery na Bootstrap da hannu daban-daban ta hanyar loda /js/*.js
fayilolin a ƙarƙashin babban jagorar matakin fakitin.
Bootstrap's package.json
ya ƙunshi ƙarin ƙarin metadata ƙarƙashin maɓallan masu zuwa:
sass
- hanyar zuwa babban fayil ɗin tushen Sass na Bootstrapstyle
- Hanyar zuwa Bootstrap's mara ƙarancin CSS wanda aka riga aka haɗa ta amfani da saitunan tsoho (babu keɓancewa)
yarn
Sanya Bootstrap a cikin kayan aikin Node.js masu ƙarfi tare da kunshin yarn :
RubyGems
Sanya Bootstrap a cikin aikace-aikacen Ruby ɗinku ta amfani da Bundler ( shawarar ) da RubyGems ta ƙara layin mai zuwa zuwa naku Gemfile
:
A madadin, idan ba kwa amfani da Bundler, zaku iya shigar da gem ta hanyar aiwatar da wannan umarni:
Duba gem's README don ƙarin cikakkun bayanai.
Mawaƙiya
Hakanan zaka iya shigar da sarrafa Bootstrap's Sass da JavaScript ta amfani da Mawaƙi :
NuGet
Idan kun haɓaka a cikin NET, zaku iya shigar da sarrafa Bootstrap's CSS ko Sass da JavaScript ta amfani da NuGet :