Fa'ase'e ile anotusi autu Fa'ase'e ile su'ega fa'amatalaga
Check
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 v5.2.1 ina ia faigofie ona tu'u i lau poloketi, lea e aofia ai:

E le aofia ai faʻamaumauga, faila faila, poʻo soʻo se faʻalagolago i le JavaScript e pei o Popper.

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:

Afai e te manaʻomia a matou seti atoa o mea faigaluega 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

CDN e ala i le 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 href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>

Afai o loʻo e faʻaogaina la matou JavaScript tuʻufaʻatasia ma e te manaʻo e tuʻu ese le Popper, faʻaopoopo le Popper i luma o le matou JS, e ala i le CDN sili.

<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz" 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 [email protected]

const bootstrap = require('bootstrap')po'o import bootstrap from 'bootstrap'le fa'apipi'iina uma o mea fa'apipi'i a Bootstrap i luga o se bootstrapmea. O le bootstrapmodule lava ia e auina atu uma a matou plugins. E mafai ona e utaina ma le lima ia plugins Bootstrap e ala i le utaina o /js/dist/*.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- ala ile Bootstrap's non-minified CSS lea na tu'ufa'atasia e fa'aaoga ai tulaga fa'aletonu (leai se aganu'u)
Amata i Bootstrap e ala i le npm ma la matou poloketi amata! Ulu i le twbs/bootstrap-npm-starter template repository e vaʻai pe faʻapefea ona fausia ma faʻavasega Bootstrap i lau lava galuega npm. E aofia ai Sass compiler, Autoprefixer, Stylelint, PurgeCSS, ma Bootstrap Icons.

vulu

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

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', '~> 5.2.1'

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 5.2.1

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:5.2.1

NuGet

Afai e te atiaʻe ile .NET Framework, e mafai foʻi ona e faʻapipiʻi ma pulea Bootstrap's CSS poʻo Sass ma JavaScript e faʻaaoga ai NuGet . O poloketi fou e tatau ona faʻaogaina le libman poʻo se isi auala e pei o NuGet ua mamanuina mo faʻamaumauga tuʻufaʻatasia, ae le o aseta pito i luma.

Install-Package bootstrap
Install-Package bootstrap.sass