Twe
Twe Bootstrap na woanya CSS ne JavaScript a wɔaboaboa ano, source code, anaa fa ka wo package managers a w’ani gye ho te sɛ npm, RubyGems, ne nea ɛkeka ho ho.
Twe code a wɔaboaboa ano a wɔasiesie sɛ wode bedi dwuma ama Bootstrap v4.0.0 na ɛnyɛ den sɛ wobɛtɔ wo project no mu, a nea ɛka ho ne:
- CSS bundles a wɔaboaboa ano na wɔayɛ no ketewaa (hwɛ CSS fael ahorow ntotoho ) .
- Wɔaboaboa JavaScript plugins ano na wɔayɛ no ketewaa
Eyi nka nkrataa, fibea fael, anaa JavaScript a ɛde ne ho to so biara a wopɛ (jQuery ne Popper.js).
Boaboa Bootstrap ano denam w’ankasa agyapade pipeline so denam yɛn fibea Sass, JavaScript, ne nkrataa fael ahorow a wobɛtwe no so. Saa nhyehyɛe yi hwehwɛ sɛ wode nnwinnade foforo bi di dwuma:
- Sass compiler (Libsass anaa Ruby Sass na wɔboa) a wode bɛboaboa wo CSS ano.
- Autoprefixer a wɔde hyɛ CSS adetɔnfo anim
Should you require build tools , wɔde ka ho ma Bootstrap ne ne docs a wobɛhyehyɛ, nanso ɛbɛyɛ sɛ ɛmfata mma w’ankasa atirimpɔw ahorow.
Skip download no ne jsDelivr na fa Bootstrap CSS ne JS a wɔaboaboa ano no cached version kɔ wo project no mu.
Sɛ wode yɛn JavaScript a wɔaboaboa ano no redi dwuma a, mma wo werɛ mmfi sɛ wode CDN nkyerɛase ahorow a ɛwɔ jQuery ne Popper.js bɛka ho ansa na ɛreba.
Twe Bootstrap no fibea fael ahorow no kɔ ɛkame ayɛ sɛ adwuma biara a ɛwɔ package managers a agye din sen biara no bi mu. Ɛmfa ho package manager no, Bootstrap bɛhwehwɛ Sass compiler ne Autoprefixer ama nhyehyɛe a ɛne yɛn official compiled versions no hyia.
Install Bootstrap wɔ wo Node.js powered apps no mu denam npm package no so :
require('bootstrap')
bɛfa Bootstrap jQuery plugins no nyinaa akɔ jQuery adeɛ no so. Module bootstrap
no ankasa ntumi nkɔ amannɔne. Wubetumi de nsa ahyɛ Bootstrap jQuery plugins no mmiako mmiako denam /js/*.js
fael ahorow a wode bɛhyɛ package no top-level directory ase no so.
Bootstrap's no package.json
kura metadata foforo bi wɔ nsafe a edidi so yi ase:
sass
- kwan a ɛkɔ Bootstrap no Sass fibea fael titiriw no sostyle
- kwan a ɛkɔ Bootstrap CSS a wɔanyɛ no ketewaa a wɔadi kan aboaboa ano denam nhyehyɛe a wɔde ahyɛ hɔ no so (wɔnyɛ nsakrae biara) .
Install Bootstrap wɔ wo Ruby apps mu denam Bundler ( wɔkamfo kyerɛ ) ne RubyGems denam line a edidi so yi a wode bɛka wo Gemfile
:
Sɛnea ɛbɛyɛ a, sɛ womfa Bundler nni dwuma a, wubetumi ahyɛ gem no denam ahyɛde yi a wode bedi dwuma no so:
Hwɛ gem no README ma nsɛm pii.
Wubetumi nso de Composer ahyɛ na woahwɛ Bootstrap no Sass ne JavaScript so :
Sɛ wo nkɔso wɔ .NET mu a, wubetumi nso instɔl na woahwɛ Bootstrap CSS anaa Sass ne JavaScript so denam NuGet :