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.1.3 supaya gampang dilebokake ing proyek sampeyan, kalebu:

  • Bundel CSS sing dikompilasi lan dikurangi (deleng 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 pipa 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 , 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-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" 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-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" 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 bertenaga Node.js kanthi 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)

RubyGems

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

gem 'bootstrap', '~> 4.1.3'

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

gem install bootstrap -v 4.1.3

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.1.3

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