Kubaka ibikoresho
Wige gukoresha Bootstrap irimo npm inyandiko za npm kugirango twubake inyandiko, gukusanya code yinkomoko, gukora ibizamini, nibindi byinshi.
Igikoresho
Bootstrap ikoresha inyandiko za NPM kuri sisitemu yo kubaka. Porogaramu yacu.json ikubiyemo uburyo bworoshye bwo gukorana nurwego, harimo gukusanya code, gukora ibizamini, nibindi byinshi .
Kugirango ukoreshe sisitemu yo kubaka no gukoresha inyandiko zacu mugace, uzakenera kopi ya dosiye ya Bootstrap yinkomoko na Node. Kurikiza izi ntambwe kandi ugomba kuba witeguye kunyeganyega:
- Kuramo hanyuma ushyire Node.js , dukoresha mugucunga ibyo twishingikirije.
- Kujya mumuzi
/bootstrap
yububiko hanyuma wirukenpm install
kugirango ushyireho ibyo twishingikirije kurutonde rwa pack.json . - Shyiramo Ruby , shyiramo Bundler hamwe
gem install bundler
, hanyuma ukorebundle install
. Ibi bizashyiraho Ruby byose biterwa, nka Jekyll na plugins.- Abakoresha Windows: Soma iki gitabo kugirango Jekyll azamuke kandi akore nta kibazo.
Numara kuzuza, uzashobora gukoresha amategeko atandukanye yatanzwe kuva kumurongo.
Gukoresha inyandiko za NPM
Package yacu.json ikubiyemo amategeko nimirimo ikurikira:
Inshingano | Ibisobanuro |
---|---|
npm run dist |
npm run dist Kurema /dist Ububiko hamwe na dosiye. Koresha Sass , Autoprefixer , na UglifyJS . |
npm test |
Kimwe na npm run dist plus ikora ibizamini byaho |
npm run docs |
Kubaka no gutondeka CSS na JavaScript ya doc. Urashobora noneho gukoresha inyandiko mugace ukoresheje npm run docs-serve . |
Iruka npm run
kugirango urebe inyandiko zose za npm.
Autoprefixer
Bootstrap ikoresha Autoprefixer (ikubiye mubikorwa byacu byo kubaka) kugirango ihite yongeramo ibicuruzwa byabacuruzi kubintu bimwe na bimwe bya CSS mugihe cyo kubaka. Kubikora bidutwara umwanya na code mukwemerera kwandika ibice byingenzi bya CSS yacu icyarimwe mugihe cyo gukuraho ibikenerwa bivangwa nabacuruzi nkibiboneka muri v3.
Turakomeza urutonde rwa mushakisha ushyigikiwe na Autoprefixer muri dosiye itandukanye mububiko bwacu bwa GitHub. Reba /.browserslistrc kubisobanuro birambuye.
Inyandiko zaho
Gukoresha inyandiko zacu mugace bisaba gukoresha Jekyll, generator yurubuga rwimiterere ihindagurika iduha: ibyingenzi birimo, Markdown ishingiye kumadosiye, inyandikorugero, nibindi byinshi. Dore uko wabitangira:
- Koresha unyuze mubikoresho byashizweho hejuru kugirango ushyire Jekyll (uwubaka urubuga) nibindi biterwa na Ruby hamwe
bundle install
. - Kuva kumuzi
/bootstrap
yububiko, koreshanpm run docs-serve
mumurongo wumurongo. - Fungura
http://localhost:9001
muri mushakisha yawe, na voilà.
Wige byinshi kubyerekeye gukoresha Jekyll usoma inyandiko zayo .
Gukemura ibibazo
Ugomba guhura nibibazo byo kwishyiriraho, kuramo verisiyo zose zabanjirije kwishingikiriza (kwisi yose hamwe n’ibanze). Noneho, ongera usubire npm install
.