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.0.0 supaya gampang dilebokake menyang 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-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" 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.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" 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.0.0'

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

gem install bootstrap -v 4.0.0

Waca README permata kanggo rincian liyane.

Komposer

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

composer require twbs/bootstrap:4.0.0

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