Haha lisebelisoa
Ithute ho sebelisa lingoloa tsa Bootstrap tse kenyellelitsoeng tsa npm ho theha litokomane tsa rona, ho bokella khoutu ea mohloli, ho etsa liteko, le tse ling.
Ho hlophisoa ha lisebelisoa
Bootstrap e sebelisa lingoloa tsa NPM bakeng sa sistimi ea eona ea kaho. Pakete ea rona.json e kenyelletsa mekhoa e bonolo ea ho sebetsa le moralo, ho kenyelletsa ho bokella khoutu, ho etsa liteko, le tse ling.
Ho sebelisa sistimi ea rona ea kaho le ho tsamaisa litokomane tsa rona sebakeng sa heno, o tla hloka khopi ea lifaele tsa mohloli oa Bootstrap le Node. Latela mehato ena 'me u lokela ho itokisetsa ho roka:
- Khoasolla le ho kenya Node.js , eo re e sebelisang ho laola lintho tseo re itšetlehileng ka tsona.
- Tsamaea ho buka ea motso
/bootstrap
'me u mathenpm install
ho kenya litšepiso tsa rona tsa lehae tse thathamisitsoeng ho package.json . - Kenya Ruby , kenya Bundler ka
gem install bundler
, 'me qetellong u tsamaeebundle install
. Sena se tla kenya litšepiso tsohle tsa Ruby, joalo ka Jekyll le li-plugins.- Basebelisi ba Windows: Bala tataiso ena ho etsa hore Jekyll a sebetse ntle le mathata.
Ha o qetile, o tla khona ho tsamaisa litaelo tse fapaneng tse fanoeng ho tsoa moleng oa taelo.
Ho sebelisa lingoloa tsa NPM
Pakete ea rona.json e kenyelletsa litaelo le mesebetsi e latelang:
Mosebetsi | Tlhaloso |
---|---|
npm run dist |
npm run dist e theha /dist directory e nang le lifaele tse hlophisitsoeng. E sebelisa Sass , Autoprefixer , le UglipJS . |
npm test |
Hoa tšoana npm run dist le hore e etsa liteko sebakeng sa heno |
npm run docs |
E haha le ho kopanya CSS le JavaScript bakeng sa litokomane. Joale u ka tsamaisa litokomane sebakeng sa heno ka npm run docs-serve . |
Matha npm run
ho bona lingoloa tsohle tsa npm.
Autoprefixer
Bootstrap e sebelisa Autoprefixer (e kenyellelitsoeng ts'ebetsong ea rona ea ho aha) ho kenyelletsa li-prefixes tsa barekisi ho thepa e 'ngoe ea CSS ka nako ea kaho. Ho etsa joalo ho re bolokela nako le khoutu ka ho re lumella ho ngola likarolo tsa bohlokoa tsa CSS ea rona ka nako e le 'ngoe ha re ntse re tlosa tlhokahalo ea metsoako ea barekisi e kang e fumanoang ho v3.
Re boloka lethathamo la libatli tse tšehetsoeng ke Autoprefixer faeleng e arohaneng ka har'a polokelo ea rona ea GitHub. Sheba /.browserslistrc bakeng sa lintlha.
Litokomane tsa lehae
Ho tsamaisa litokomane tsa rona sebakeng sa heno ho hloka ts'ebeliso ea Jekyll, jenereithara ea sebaka sa marang-rang se feto-fetohang se re fang: tsa mantlha li kenyelletsa, lifaele tse thehiloeng ho Markdown, litempele, le tse ling. Tsela ea ho e qala ke ena:
- Matha ka setupong sa lisebelisoa ka holimo ho kenya Jekyll (sehahi sa sebaka sa marang-rang) le tse ling tse itšetlehileng ka Ruby ka
bundle install
. - Ho tsoa bukeng ea motso
/bootstrap
, mathanpm run docs-serve
moleng oa taelo. - Bula
http://localhost:9001
ho sebatli sa hau, 'me u voilà.
Ithute haholoanyane ka ho sebelisa Jekyll ka ho bala litokomane tsa eona .
Ho batle phoso
Haeba u ka kopana le mathata ka ho kenya li- dependencies, tlosa mefuta eohle e fetileng ea ho itšetleha (ea lefats'e le ea lehae). Ebe u khutlisetsa npm install
.