Bil tul dɛn
Lan aw fɔ yuz Bootstrap in inklud npm skript fɔ bil wi dɔkyumentri, kɔmpilayt sɔs kɔd, rɔn tɛst, ɛn ɔda tin dɛn.
Bootstrap de yuz NPM skript fɔ in bild sistem. Wi package.json gɛt fayn fayn we dɛn fɔ wok wit di fremwɔk, lɛk fɔ kɔmpilayt kɔd, fɔ rɔn tɛst, ɛn ɔda tin dɛn.
Fɔ yuz wi bild sistem ɛn rɔn wi dɔkyumentri lokal wan, yu go nid wan kɔpi fɔ Bootstrap in sɔs fayl dɛn ɛn Node. Fɔ fala dɛn step ya ɛn yu fɔ rɛdi fɔ rɔk:
- Daunlod ɛn instɔl Node.js , we wi kin yuz fɔ manej wi dipɛnsin dɛn.
- Navigate to di rut
/bootstrap
dairektrɔ ɛn rɔnnpm install
fɔ instɔl wi lokal dipɛnsin dɛn we de na package.json . - Instɔl Ruby , instɔl Bundler wit
gem install bundler
, ɛn las las rɔnbundle install
. Dis go instɔl ɔl di Ruby dipɛnsin dɛn, lɛk Jekyll ɛn plɔgin dɛn.- Di wan dɛn we de yuz Windows: Rid dis gayd fɔ mek Jekyll bigin fɔ wok ɛn nɔ gɛt prɔblɛm.
We yu dɔn, yu go ebul fɔ rɔn di difrɛn kɔmand dɛn we dɛn gi yu frɔm di kɔmand layn.
Wi package.json gɛt dɛn kɔmand ɛn wok dɛn ya:
Wok | Tɔk bɔt |
---|---|
npm run dist |
npm run dist de mek di /dist dairektrɔ wit fayl dɛn we dɛn dɔn kɔmpilayt. Yuz Sass , Ɔtoprɛfiksa , ɛn UglifyJS . |
npm test |
Same as npm run dist plus i de ron test lokal |
npm run docs |
Bil ɛn lint CSS ɛn JavaSkript fɔ dɔkyumɛnt dɛn. Dɔn yu kin rɔn di dɔkyumentri lokal wan bay npm run docs-serve . |
Rɔn npm run
fɔ si ɔl di npm skript dɛn.
Bootstrap de yuz Autoprefixer (we de insay wi bil prɔses) fɔ ad vendor prɛfiks dɛn ɔtomɛtik wan to sɔm CSS prɔpati dɛn we dɛn de bil. We wi du dat, i de sev wi tɛm ɛn kɔd bay we i de alaw wi fɔ rayt di men pat dɛn na wi CSS wan tɛm we wi nɔ nid fɔ gɛt vendor mixins lɛk di wan dɛn we de na v3.
Wi de kip di list fɔ di brawza dɛn we dɛn sɔpɔt tru Autoprefixer insay wan sɛpret fayl insay wi GitHub ripɔsitɔri. Si /package.json fɔ di ditel dɛn.
Fɔ rɔn wi dɔkyumentri lokal wan nid fɔ yuz Jekyll, wan decently fleksibul statik sayt jenɛratɔ we de gi wi: besik inklud, Markdown-based fayl dɛn, tɛmplat, ɛn mɔ. Na dis na aw fɔ mek i bigin:
- Rɔn tru di tul sɛtup we de ɔp fɔ instɔl Jekyll (di sayt bilda) ɛn ɔda Ruby dipɛnsin dɛn wit
bundle install
. - Frɔm di rut
/bootstrap
dairektrɔ, rɔnnpm run docs-serve
na di kɔmand layn. - Opin
http://localhost:9001
na yu brawza, ɛn voilà.
Lan mɔ bɔt aw fɔ yuz Jekyll bay we yu rid in dɔkyumentri .
If yu gɛt prɔblɛm wit fɔ instɔl dipɛnsin dɛn, ɔninstɔlɔ ɔl di dipɛnsin vɛshɔn dɛn we bin dɔn de bifo (global ɛn lokal). Dɔn, rirun npm install
.