Zimba ebikozesebwa
Yiga engeri y'okukozesaamu Bootstrap's included npm scripts okuzimba ebiwandiiko byaffe, okukung'aanya source code, okuddukanya ebigezo, n'ebirala.
Okuteekawo ebikozesebwa
Bootstrap ekozesa scripts za npm ku nkola yaayo ey'okuzimba. Package.json yaffe erimu enkola ennyangu ez'okukola ne framework, omuli okukung'aanya code, okuddukanya okugezesebwa, n'ebirala.
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:
- Wano wefunire era oteekeko Node.js , gye tukozesa okuddukanya ebintu bye twesigamyeko.
- Oba wanula ensonda za Bootstrap oba fork etterekero lya Bootstrap .
- Genda ku root
/bootstrap
directory era oddukenpm install
okuteeka 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 run
okulaba 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. Yeetaaga 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. |
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 (eg. padding-left
) n’ekintu 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:
- Dduka okuyita mu nteekateeka y'ebikozesebwa waggulu okuteeka ebisinziirwako byonna.
- Okuva mu ndagiriro y'ekikolo
/bootstrap
, ddukanpm run docs-serve
mu layini y'ekiragiro. - 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
.