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 ebiragiro n'emirimu gino wammanga:
Ekigezo | Okunnyonnyola |
---|---|
npm run dist |
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 n'addukanya ebiwandiiko mu kitundu. |
Dduka npm run
olabe scripts zonna eza npm.
Sass nga bwe kiri
Bootstrap v4 ekozesa Node Sass okukunganya fayiro zaffe ez’ensibuko ya Sass mu fayiro za CSS (ezirimu mu nkola yaffe ey’okuzimba). Okusobola okumaliriza nga olina CSS y’emu ekoleddwa nga okuŋŋaanya Sass ng’okozesa payipu yo ey’eby’obugagga, ojja kwetaaga okukozesa omukung’aanya wa Sass awagira waakiri ebikozesebwa Node Sass by’ekola. Kino kikulu okumanya kubanga okutuuka nga October 26, 2020, LibSass ne packages ezizimbibwa waggulu waayo —nga mw’otwalidde ne Node Sass —zivuddewo .
Bw’oba weetaaga ebikozesebwa bya Sass ebipya oba okukwatagana n’omutindo gwa CSS omupya, Dart Sass kati ye nkola enkulu eya Sass era ewagira JavaScript API ekwatagana mu bujjuvu ne Node Sass (okuggyako ebitonotono ebiragiddwa ku lupapula lwa Dart Sass olwa GitHub ).
Twongera ku Sass rounding precision okutuuka ku 6 (by default, it's 5 mu Node Sass) okuziyiza ensonga z'okuzingulula browser. Bw’oba okozesa Dart Sass kino tekijja kuba kintu ky’olina kutereeza, anti compiler oyo ekozesa rounding precision ya 10 era olw’ensonga z’obulungi tagikkiriza kutereezebwa.
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.
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 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
.