Tsitsani
Tsitsani Bootstrap kuti mupeze CSS yophatikizidwa ndi JavaScript, khodi yoyambira, kapena muphatikize ndi oyang'anira phukusi omwe mumakonda monga npm, RubyGems, ndi zina zambiri.
Kuphatikizidwa kwa CSS ndi JS
Tsitsani khodi yokonzekera kugwiritsa ntchito ya Bootstrap v4.4.1 kuti mulowe mu pulojekiti yanu, yomwe ikuphatikiza:
- Mitolo ya CSS yophatikizidwa komanso yocheperako (onani kufananitsa kwa mafayilo a CSS )
- Mapulagini ophatikizidwa ndi ocheperako a JavaScript
Izi sizikuphatikiza zolemba, mafayilo oyambira, kapena kudalira kulikonse kwa JavaScript (jQuery ndi Popper.js).
Mafayilo oyambira
Sungani Bootstrap ndi payipi yanuyanu potsitsa gwero lathu la Sass, JavaScript, ndi mafayilo olembedwa. Izi zimafuna zida zowonjezera:
- Sass compiler (Libsass kapena Ruby Sass imathandizidwa) kuti mupange CSS yanu.
- Autoprefixer ya CSS ogulitsa prefixing
Ngati mungafune zida zomangira , zikuphatikizidwa kuti mupange Bootstrap ndi zolemba zake, koma mwina ndizosayenera pazolinga zanu.
jsDelivr
Lumphani kutsitsa ndi jsDelivr kuti mupereke mtundu wosungidwa wa Bootstrap wopangidwa ndi CSS ndi JS ku projekiti yanu.
Ngati mukugwiritsa ntchito JavaScript yopangidwa, musaiwale kuphatikiza mitundu ya CDN ya jQuery ndi Popper.js isanakwane.
Oyang'anira phukusi
Kokani mafayilo amtundu wa Bootstrap pafupifupi projekiti iliyonse yokhala ndi oyang'anira phukusi otchuka kwambiri. Ziribe kanthu woyang'anira phukusi, Bootstrap idzafuna Sass compiler ndi Autoprefixer kuti akhazikitse zomwe zikugwirizana ndi mitundu yathu yovomerezeka.
npm
Ikani Bootstrap mu mapulogalamu anu a Node.js omwe ali ndi phukusi la npm :
require('bootstrap')
idzakweza mapulagini onse a Bootstrap a jQuery pa chinthu cha jQuery. Module bootstrap
palokha situmiza kunja chilichonse. Mutha kuyika mapulagini a Bootstrap a jQuery payekhapayekha pokweza /js/*.js
mafayilo omwe ali pansi pa chikwatu chapamwamba kwambiri.
Bootstrap's package.json
ili ndi metadata yowonjezera pansi pa makiyi awa:
sass
- njira yopita ku fayilo yayikulu ya Sass ya Bootstrapstyle
- njira yopita ku CSS yosagwirizana ndi Bootstrap yomwe idapangidwa kale pogwiritsa ntchito zosintha (palibe makonda)
ulusi
Ikani Bootstrap mu mapulogalamu anu a Node.js omwe ali ndi phukusi la ulusi :
RubyGems
Ikani Bootstrap mu mapulogalamu anu a Ruby pogwiritsa ntchito Bundler ( yalimbikitsa ) ndi RubyGems powonjezera mzere wotsatira wanu Gemfile
:
Kapenanso, ngati simukugwiritsa ntchito Bundler, mutha kukhazikitsa mwala wamtengo wapatali poyendetsa lamulo ili:
Onani zamtengo wapatali za README kuti mumve zambiri.
Wopeka
Mutha kukhazikitsanso ndikuwongolera Sass ya Bootstrap ndi JavaScript pogwiritsa ntchito Composer :
NuGet
Ngati mukupanga .NET, mutha kukhazikitsanso ndikuwongolera CSS ya Bootstrap kapena Sass ndi JavaScript pogwiritsa ntchito NuGet :