Source

Ngundhuh

Download Bootstrap kanggo entuk CSS lan JavaScript sing dikompilasi, kode sumber, utawa kalebu karo manajer paket favorit kaya npm, RubyGems, lan liya-liyane.

Kompilasi CSS lan JS

Download kode kompilasi sing siap digunakake kanggo Bootstrap v4.2.1 supaya gampang dilebokake menyang proyek sampeyan, kalebu:

  • Bundel CSS sing dikompilasi lan diminimalisir (ndeleng perbandingan file CSS )
  • Plugin JavaScript sing dikompilasi lan diminimalisir

Iki ora kalebu dokumentasi, file sumber, utawa dependensi JavaScript opsional (jQuery lan Popper.js).

Ngundhuh

File sumber

Kompilasi Bootstrap nganggo saluran aset sampeyan kanthi ngundhuh file Sass, JavaScript, lan dokumentasi sumber kita. Opsi iki mbutuhake sawetara perkakas tambahan:

  • Sass compiler (Libsass utawa Ruby Sass didhukung) kanggo kompilasi CSS sampeyan.
  • Autoprefixer kanggo CSS vendor prefixing

Yen sampeyan mbutuhake alat mbangun , iku kalebu kanggo ngembangake Bootstrap lan dokumen, nanging ora cocog kanggo tujuan sampeyan dhewe.

Ngundhuh sumber

jsDelivr

Skip download nganggo jsDelivr kanggo ngirim versi cache saka CSS lan JS kompilasi Bootstrap menyang proyek sampeyan.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>

Yen sampeyan nggunakake JavaScript kompilasi, aja lali kanggo nyakup versi CDN saka jQuery lan Popper.js sadurunge.

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>

Manajer paket

Narik file sumber Bootstrap menyang meh kabeh proyek karo sawetara manajer paket sing paling populer. Ora preduli manajer paket, Bootstrap mbutuhake kompiler Sass lan Autoprefixer kanggo persiyapan sing cocog karo versi kompilasi resmi kita.

npm

Instal Bootstrap ing aplikasi Node.js sampeyan nganggo paket npm :

npm install bootstrap

require('bootstrap')bakal mbukak kabeh plugin jQuery Bootstrap menyang obyek jQuery. Modul bootstrapdhewe ora ngekspor apa-apa. Sampeyan bisa mbukak plugin jQuery Bootstrap kanthi manual kanthi ngemot /js/*.jsfile ing direktori tingkat paling dhuwur paket kasebut.

Bootstrap package.jsonngemot sawetara metadata tambahan ing ngisor iki:

  • sass- path menyang file sumber Sass utama Bootstrap
  • style- path menyang CSS non-minified Bootstrap sing wis dikompilasi nggunakake setelan gawan (ora kustomisasi)

tenunan

Instal Bootstrap ing aplikasi Node.js sampeyan kanthi paket benang :

yarn add bootstrap

RubyGems

Instal Bootstrap ing aplikasi Ruby sampeyan nggunakake Bundler ( disaranake ) lan RubyGems kanthi nambahake baris ing ngisor iki menyang Gemfile:

gem 'bootstrap', '~> 4.2.1'

Utawa, yen sampeyan ora nggunakake Bundler, sampeyan bisa nginstal permata kanthi nggunakake printah iki:

gem install bootstrap -v 4.2.1

Waca README permata kanggo rincian liyane.

Pengarang

Sampeyan uga bisa nginstal lan ngatur Bootstrap's Sass lan JavaScript nggunakake Composer :

composer require twbs/bootstrap:4.2.1

NuGet

Yen sampeyan ngembangake ing .NET, sampeyan uga bisa nginstal lan ngatur CSS utawa Sass lan JavaScript Bootstrap nggunakake NuGet :

Install-Package bootstrap
Install-Package bootstrap.sass