Fausia meafaigaluega
A'oa'o pe fa'apefea ona fa'aoga le Bootstrap's aofia ai npm scripts e fausia ai a tatou pepa fa'amaumauga, tu'ufa'atasia le code source, su'e su'ega, ma isi mea.
Bootstrap faʻaaoga tusitusiga NPM mo lona faʻavaeina. O la matou package.json e aofia ai metotia talafeagai mo le galue ma le faʻavae, e aofia ai le tuʻufaʻatasia o code, suʻega faʻataʻitaʻiga, ma isi mea.
Mo le faʻaogaina o la matou faufale ma faʻatautaia a matou faʻamaumauga i le lotoifale, e te manaʻomia se kopi o faila faila a Bootstrap ma Node. Mulimuli i laasaga nei ma e tatau ona e sauni e lulu:
- Faʻapipiʻi ma faʻapipiʻi Node.js , lea matou te faʻaogaina e pulea ai a matou faʻalagolago.
- Su'e i le root
/bootstrap
directory ma tamoenpm install
e fa'apipi'i a matou fa'alagolago i le lotoifale o lo'o lisiina i totonu package.json . - Faʻapipiʻi Ruby , faʻapipiʻi le Bundler ma
gem install bundler
, ma mulimuli ane tamoebundle install
. Ole mea lea ole a fa'apipi'i uma fa'alagolago Ruby, pei ole Jekyll ma plugins.- Tagata fa'aoga Windows: Faitau lenei ta'iala e fa'aola ai Jekyll e aunoa ma ni fa'afitauli.
A maeʻa, o le a mafai ona e faʻatautaia tulafono eseese o loʻo tuʻuina mai i le laina o le poloaiga.
O la matou package.json e aofia ai tulafono ma galuega nei:
Galuega | Fa'amatalaga |
---|---|
npm run dist |
npm run dist faia le /dist lisi ma faila tu'ufa'atasi. Fa'aaoga Sass , Autoprefixer , ma UglifyJS . |
npm test |
E tutusa ma le npm run dist plus e fa'atino su'ega i le lotoifale |
npm run docs |
Fausia ma lints CSS ma JavaScript mo docs. Ona mafai lea ona e faʻatautaia le faʻamaumauga i le lotoifale e ala i le npm run docs-serve . |
Tamomoe npm run
e vaʻai i tusitusiga npm uma.
E fa'aaoga e Bootstrap le Autoprefixer (e aofia ai i la tatou faiga faufale) e otometi ona fa'aopoopo fa'atauga fa'atau i nisi o meatotino CSS ile taimi fau. O le faia o lea mea e sefe ai le taimi ma le faʻailoga e ala i le faʻatagaina oi matou e tusi vaega autu o la matou CSS i se taimi e tasi aʻo faʻaumatia le manaʻoga mo faʻafefiloi faʻatau e pei o loʻo maua i le v3.
Matou te tausia le lisi o suʻesuʻega o loʻo lagolagoina e le Autoprefixer i se isi faila i totonu o le matou fale teu oloa GitHub. Va'ai /package.json mo fa'amatalaga.
O le faʻatinoina o a matou faʻamaumauga i le lotoifale e manaʻomia ai le faʻaogaina o le Jekyll, o se faʻapipiʻi fetuutuunai faʻapipiʻi nofoaga e maua ai i matou: faʻavae e aofia ai, faila faʻavae Markdown, faʻataʻitaʻiga, ma isi mea. O le auala lenei e amata ai:
- Faʻasaga i le seti meafaigaluega i luga e faʻapipiʻi ai Jekyll (le faufale) ma isi faʻalagolago Ruby ma
bundle install
. - Mai le root
/bootstrap
directory, tamoenpm run docs-serve
i le laina o le poloaiga. - Tatala
http://localhost:9001
i lau suʻesuʻega, ma faʻaalia.
Aoao atili e uiga i le faʻaaogaina o Jekyll e ala i le faitauina o ana faʻamaumauga .
Afai e te feagai ma faʻafitauli i le faʻapipiʻiina o mea faʻalagolago, aveese uma lomiga faʻalagolago muamua (lalolagi ma le lotoifale). Ona toe fai lea npm install
.