Source

Fausia meafaigaluega

A'oa'o pe fa'apefea ona fa'aoga le Bootstrap's aofia ai npm scripts e fausia ai a tatou fa'amaumauga, tu'ufa'atasia le code source, su'e su'ega, ma isi mea.

Fa'atonuga meafaigaluega

Bootstrap faʻaoga npm scripts mo lona faʻaogaina faiga. 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:

  1. Faʻapipiʻi ma faʻapipiʻi Node.js , lea matou te faʻaogaina e pulea ai a matou faʻalagolago.
  2. Su'e i le root /bootstrapdirectory ma tamoe npm installe fa'apipi'i a matou fa'alagolago i le lotoifale o lo'o lisiina i totonu package.json .
  3. Faʻapipiʻi Ruby , faʻapipiʻi le Bundler ma gem install bundler, ma mulimuli ane tamoe bundle 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.

Faʻaaogaina tusi npm

O la matou package.json e aofia ai tulafono ma galuega nei:

Galuega Fa'amatalaga
npm run dist npm run distfaia le /dist/lisi ma faila tu'ufa'atasi. Fa'aaoga Sass , Autoprefixer , ma UglifyJS .
npm test E tutusa ma le npm run distplus 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 rune vaʻai i tusitusiga npm uma.

Autoprefixer

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 .browserslistrc mo fa'amatalaga.

Fa'amaumauga fa'alotoifale

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:

  1. Faʻasaga i le seti meafaigaluega i luga e faʻapipiʻi ai Jekyll (le faufale) ma isi faʻalagolago Ruby ma bundle install.
  2. Mai le root /bootstrapdirectory, tamoe npm run docs-servei le laina o le poloaiga.
  3. Tatala http://localhost:9001i lau suʻesuʻega, ma faʻaalia.

Aʻoaʻo atili e uiga i le faʻaaogaina o Jekyll e ala i le faitauina o ana faʻamaumauga .

Fa'afitauli

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.