in English

La'u mai

Download Bootstrap e maua ai le CSS tuʻufaʻatasia ma le JavaScript, code source, pe faʻapipiʻi i au pule pusa e sili ona e fiafia i ai e pei o le npm, RubyGems, ma isi mea.

CSS ma JS tuufaatasia

La'i mai le code ua tu'ufa'atasia ua saunia mo le Bootstrap v4.5.3 ina ia faigofie ona tu'u i totonu o lau poloketi, lea e aofia ai:

  • Fa'atasi ma fa'aitiitiga fusipa'u CSS (va'ai fa'atusatusaga faila CSS )
  • Fa'aopoopo ma fa'aitiitiga fa'apipi'i JavaScript

E le aofia ai fa'amaumauga, faila fa'apogai, po'o so'o se fa'alagolago i le JavaScript (jQuery ma Popper.js).

La'u mai

Punavai faila

Fa'atasia le Bootstrap i lau oe lava aseta paipa e ala i le siiina mai o la matou puna Sass, JavaScript, ma faila faila. O lenei filifiliga e manaʻomia ai nisi meafaigaluega faʻaopoopo:

  • Sass compiler (Libsass poo Ruby Sass e lagolagoina) mo le tuufaatasia o lau CSS.
  • Autoprefixer mo CSS fa'atau muamua

Afai e te manaʻomia ni meafaigaluega faufale , e aofia ai mo le atinaʻeina o Bootstrap ma ona faʻamaumauga, ae e foliga mai e le talafeagai mo ou lava faʻamoemoega.

La'u mai le puna

Faataitaiga

Afai e te manaʻo e sii mai ma suʻesuʻe a matou faʻataʻitaʻiga , e mafai ona e puʻeina faʻataʻitaʻiga ua uma ona fausia:

La'u Fa'ata'ita'iga

jsDelivr

Fa'ase'e le download ma le jsDelivr e tu'u atu ai le kopi o le CSS tu'ufa'atasi a Bootstrap ma le JS i lau poloketi.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>

Afai o lo'o e fa'aogaina la matou JavaScript tu'ufa'atasi ma e te mana'o e fa'aaofia fa'atasi Popper.js, fa'aopoopo Popper.js i luma ole matou JS, e ala i le CDN e sili.

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>

Pule o afifi

Toso i totonu faila faila a Bootstrap i toetoe lava o soʻo se poloketi ma nisi o pule sili ona lauiloa. Po o le a lava le pule o pusa, Bootstrap o le a manaʻomia se Sass compiler ma Autoprefixer mo se seti e fetaui ma a tatou lomiga tuʻufaʻatasia aloaia.

npm

Faʻapipiʻi le Bootstrap i lau Node.js faʻamalosia polokalama faʻatasi ma le npm package :

npm install bootstrap

require('bootstrap')o le a la'u uma ia Bootstrap's jQuery plugins i luga o le mea jQuery. O le bootstrapmodule lava ia e le auina atu i fafo se mea. E mafai ona e utaina ma le lima ia Bootstrap's jQuery plugins ta'ito'atasi e ala i le utaina o /js/*.jsfaila i lalo o le lisi pito i luga o le afifi.

Bootstrap o package.jsonloʻo i ai nisi metadata faaopoopo i lalo o ki nei:

  • sass- ala ile faila autu Sass a Bootstrap
  • style- auala i le CSS e le faʻaititia a Bootstrap lea na faʻapipiʻiina muamua e faʻaaoga ai le faʻaogaina o tulaga (leai se faʻapitoa)

vulu

Fa'apipi'i le Bootstrap i lau Node.js fa'aogaina polokalame fa'atasi ma le afifi vulu :

yarn add bootstrap

RubyGems

Faʻapipiʻi le Bootstrap i lau Ruby apps e faʻaaoga ai le Bundler ( fautuaina ) ma RubyGems e ala i le faʻaopoopoina o le laina lea i lau Gemfile:

gem 'bootstrap', '~> 4.5.3'

I le isi itu, afai e te le o faʻaogaina le Bundler, e mafai ona e faʻapipiʻi le maa e ala i le faʻatinoina o lenei poloaiga:

gem install bootstrap -v 4.5.3

Va'ai le README a le gem mo nisi fa'amatalaga.

Fai pese

E mafai foi ona e faʻapipiʻi ma pulea le Bootstrap's Sass ma le JavaScript e faʻaaoga ai le Composer :

composer require twbs/bootstrap:4.5.3

NuGet

Afai e te atiaʻe ile .NET, e mafai foʻi ona e faʻapipiʻi ma pulea Bootstrap's CSS poʻo Sass ma JavaScript e faʻaaoga ai NuGet :

Install-Package bootstrap
Install-Package bootstrap.sass