Buuka ku bigambo ebikulu Buuka ku docs navigation
Check
in English

Okuwaayo

Yamba okukola Bootstrap n'ebiwandiiko byaffe okuzimba scripts n'okugezesa.

Okuteekawo ebikozesebwa

Bootstrap ekozesa scripts za npm okuzimba ebiwandiiko n'okukung'aanya fayiro z'ensibuko. Package.json yaffe erimu scripts zino ez'okukung'aanya code, okuddukanya okugezesebwa, n'ebirala. Bino tebigendereddwa kukozesebwa bweru wa tterekero lyaffe n'ebiwandiiko.

Okukozesa enkola yaffe ey'okuzimba n'okuddukanya ebiwandiiko byaffe mu kitundu, ojja kwetaaga kkopi ya fayiro z'ensibuko ya Bootstrap ne Node. Goberera emitendera gino era olina okuba nga weetegese okukankana:

  1. Wano wefunire era oteekeko Node.js , gye tukozesa okuddukanya ebintu bye twesigamyeko.
  2. Oba wanula ensonda za Bootstrap oba fork etterekero lya Bootstrap .
  3. Genda ku root /bootstrapdirectory era odduke npm installokuteeka ebisinziirwako byaffe eby'omu kitundu ebiragiddwa mu package.json .

Bw’omala, ojja kusobola okuddukanya ebiragiro eby’enjawulo ebiweereddwa okuva ku layini y’ebiragiro.

Okukozesa ebiwandiiko bya npm

Package.json yaffe erimu emirimu mingi egy'okukola pulojekiti. Dduka npm runokulaba scripts zonna eza npm mu terminal yo. Emirimu emikulu mulimu:

Ekigezo Okunnyonnyola
npm start Akungaanya CSS ne JavaScript, azimba ebiwandiiko, era atandika seva ya wano.
npm run dist Ekola dist/dayirekita nga erimu fayiro ezikung’aanyiziddwa. Akozesa Sass , Autoprefixer , ne terser .
npm test Addukanya ebigezo mu kitundu oluvannyuma lw’okuddukanpm run dist
npm run docs-serve Azimba era addukanya ebiwandiiko mu kitundu.
Tandika ne Bootstrap ng'oyita ku npm ne pulojekiti yaffe ey'okutandika! Yolekera twbs/bootstrap-npm-starter template repository olabe engeri y'okuzimba n'okulongoosa Bootstrap mu pulojekiti yo eya npm. Mulimu omukung'aanya wa Sass, Autoprefixer, Stylelint, PurgeCSS, ne Ebifaananyi bya Bootstrap.

Sass nga bwe kiri

Bootstrap ekozesa Dart Sass okukung'aanya fayiro zaffe ez'ensibuko ya Sass mu fayiro za CSS (ezirimu mu nkola yaffe ey'okuzimba), era tukukubiriza okukola kye kimu bw'oba okuŋŋaanya Sass ng'okozesa payipu yo ey'eby'obugagga. Emabegako twakozesanga Node Sass ku Bootstrap v4, naye LibSass ne packages ezizimbibwa waggulu waayo, omuli Node Sass, kati ziweddewo .

Dart Sass ekozesa rounding precision ya 10 era olw’ensonga z’obulungi tekkiriza kulongoosa muwendo guno. Tetukkakkanya ku butuufu buno nga twongera okukola ku CSS yaffe eyakolebwa, gamba nga mu kiseera ky’okukendeeza, naye bw’oba ​​wasalawo okukikola tusaba okukuuma obutuufu waakiri 6 okuziyiza ensonga z’okuzingulula kwa bbulawuzi.

Entandikwa y’okwefuga

Bootstrap ekozesa Autoprefixer (erimu mu nkola yaffe ey’okuzimba) okwongera mu ngeri ey’otoma entandikwa z’abatunzi ku bintu ebimu ebya CSS mu kiseera ky’okuzimba. Okukola ekyo kituwonya obudde ne code nga kitusobozesa okuwandiika ebitundu ebikulu ebya CSS yaffe omulundi gumu ate nga kimalawo obwetaavu bwa vendor mixins nga ezo ezisangibwa mu v3.

Tukuuma olukalala lwa browser eziwagirwa okuyita mu Autoprefixer mu fayiro ey’enjawulo munda mu tterekero lyaffe erya GitHub. Laba .browserslistrc okumanya ebisingawo.

RTLCSS nga bwe kiri

Bootstrap ekozesa RTLCSS okukola ku CSS ezikung’aanyiziddwa n’okuzikyusa mu RTL – okusinga okukyusa eby’obugagga ebimanyi obulagirizi obw’okwebungulula (okugeza padding-left) n’ekikontana nabyo. Kitusobozesa okuwandiika CSS yaffe omulundi gumu gwokka ne tukola tweaks entonotono nga tukozesa RTLCSS control and value directives.

Ebiwandiiko by’ekitundu

Okuddukanya ebiwandiiko byaffe mu kitundu kyetaagisa okukozesa Hugo, efuna okuteekebwawo okuyita mu hugo-bin npm package. Hugo ye blazingly fast era quite extensible static site generator etuwa: basic mulimu, Markdown-based fayiro, templates, n'ebirala. Laba engeri gy'oyinza okugitandika:

  1. Dduka okuyita mu nteekateeka y'ebikozesebwa waggulu okuteeka ebisinziirwako byonna.
  2. Okuva mu ndagiriro y'ekikolo /bootstrap, dduka npm run docs-servemu layini y'ekiragiro.
  3. Ggulawo http://localhost:9001/mu browser yo, era voilà.

Manya ebisingawo ku nkozesa ya Hugo ng'osoma ebiwandiiko byayo .

Okugonjoola ebizibu

Singa osanga obuzibu mu kuteeka ebisinziirako, ggyawo enkyusa zonna ez'okwesigamizibwa ezaaliwo emabega (ensi yonna n'ey'omu kitundu). Oluvannyuma, ddamu okudduka npm install.