Yakha izixhobo
Funda indlela yokusebenzisa i-Bootstrap equkiweyo yemibhalo eshicilelweyo ye-npm ukwakha amaxwebhu ethu, ukuqokelela ikhowudi yemvelaphi, ukuqhuba iimvavanyo, kunye nokunye.
Ukuseta izixhobo
I-Bootstrap isebenzisa izikripthi ze-npm zenkqubo yayo yokwakha. Iphakheji.json yethu ibandakanya iindlela ezifanelekileyo zokusebenza kunye nesakhelo, kubandakanya ukuqulunqa ikhowudi, ukuqhuba iimvavanyo, kunye nokunye.
Ukusebenzisa inkqubo yethu yokwakha kwaye usebenzise amaxwebhu ethu ekuhlaleni, uya kufuna ikopi yeefayile zemvelaphi yeBootstrap kunye neNode. Landela la manyathelo kwaye kuya kufuneka ukuba ulungele ukushukuma:
- Khuphela kwaye ufake i-Node.js , esiyisebenzisayo ukulawula ukuxhomekeka kwethu.
- Lawula kulawulo lweengcambu
/bootstrap
kwaye ubalekenpm install
ukufaka ukuxhomekeka kwethu kwendawo edweliswe kwi package.json . - Faka iRuby , faka iBundler nge
gem install bundler
, kwaye ekugqibeleni usebenzebundle install
. Oku kuya kufaka zonke izinto ezixhomekeke kuRuby, ezifana neJekyll kunye neeplagi.- Abasebenzisi beWindows: Funda esi sikhokelo ukuze ufumane i-Jekyll kwaye isebenze ngaphandle kweengxaki.
Xa ugqityiwe, uya kukwazi ukusebenzisa imiyalelo eyahlukeneyo enikezelweyo kumgca womyalelo.
Ukusebenzisa izikripthi ze-npm
Ipakethe yethu.json ibandakanya le miyalelo kunye nemisebenzi elandelayo:
Umsebenzi | Inkcazo |
---|---|
npm run dist |
npm run dist yenza /dist/ uvimba weefayili ngeefayile eziqokelelweyo. Isebenzisa iSass , iAutoprefixer , kunye ne UglipJS . |
npm test |
Ngokufana ne- npm run dist plus iqhuba iimvavanyo ekuhlaleni |
npm run docs |
Yakha kunye ne-CSS kunye neJavaScript yamaxwebhu. Ungaqhuba uxwebhu ngoku npm run docs-serve . |
Baleka npm run
ukuze ubone zonke izikripthi ze-npm.
Autoprefixer
I- Bootstrap isebenzisa i -Autoprefixer (ebandakanyiweyo kwinkqubo yethu yokwakha) ukongeza ngokuzenzekelayo izimaphambili zomthengisi kwezinye iipropathi zeCSS ngexesha lokwakha. Ukwenza oko kusigcina ixesha kunye nekhowudi ngokusivumela ukuba sibhale iinxalenye eziphambili zeCSS yethu ngexesha elinye ngelixa sisusa imfuno yokuxutywa komthengisi njengabo bafumaneka kwi-v3.
Sigcina uluhlu lwezikhangeli ezixhaswayo nge-Autoprefixer kwifayile eyahlukileyo ngaphakathi kwendawo yethu yokugcina iGitHub. Bona .browserlistrc ngeenkcukacha.
Amaxwebhu asekuhlaleni
Ukuqhuba amaxwebhu ethu ekuhlaleni kufuna ukusetyenziswa kweJekyll, ijenereyitha yesiza esinesidima esinesidima esisibonelela: isiseko sibandakanya, iifayile ezisekelwe kuMarkdown, iitemplates, kunye nokunye. Nantsi indlela yokuyiqalisa:
- Qhuba ngokuseta isixhobo esingentla ukuze ufake i-Jekyll (umakhi wesiza) kunye nezinye ezixhomekeke kuRuby nge
bundle install
. - Ukusuka
/bootstrap
kulawulo lweengcambu, sebenzisanpm run docs-serve
kumgca womyalelo. - Vula kwisikhangeli
http://localhost:9001
sakho, kwaye voilà.
Funda ngakumbi malunga nokusebenzisa i-Jekyll ngokufunda amaxwebhu ayo .
Ukulungisa ingxaki
Ukuba udibana neengxaki ngokufakela ukuxhomekeka, khupha zonke iinguqulelo zangaphambili zokuxhomekeka (kwihlabathi jikelele kunye nelasekhaya). Emva koko, phinda wenze npm install
.