Main content ah kal rawh Docs navigation ah kal rawh
in English

Hmanrua siam rawh

Bootstrap-a npm script awmte hmanga kan documentation siam dan tur, source code compile dan tur, test kalpui dan tur leh thil dang tam tak hman dan zir rawh.

Tooling siam dan tur

Bootstrap hian a build system atan npm scripts a hmang thin. Kan package.json hian framework nena hnathawh dan awlsam tak tak a keng tel a, chung zingah chuan code compiling, test run leh a dangte pawh a tel.

Kan build system hmang tur leh kan documentation local taka run tur chuan Bootstrap source files leh Node copy i mamawh ang. Heng step te hi zawm la, rock turin i inpeih tur a ni:

  1. Kan dependency enkawl nan kan hmang thin Node.js download la, install rawh .
  2. Bootstrap sources te download emaw , Bootstrap repository fork emaw .
  3. Root /bootstrapdirectory ah kal la, package.jsonnpm install a kan local dependencies tarlan te install turin run rawh .

A zawh chuan command line atanga command hrang hrang pek te chu i run thei tawh ang.

npm script hmangin

Kan package.json hian project siamna tur hna tam tak a keng tel a. npm runI terminal chhunga npm script awm zawng zawng hmuh theih nan run rawh . Hna pawimawh ber berte chu:

Tihtur Hrilhfiahna
npm start CSS leh JavaScript a compile a, documentation a siam a, local server a start bawk.
npm run dist Compiled dist/files awmna directory a siam thin. Sass , Autoprefixer , leh terser te a ngai a ni .
npm test Run zawhah local-in test a kalpui thinnpm run dist
npm run docs-serve Documentation chu local-in a siam a, a kalpui bawk.
Kan starter project hmang hian npm hmangin Bootstrap hmangin tan la rawh! I npm project-a Bootstrap siam leh siam dan tur en turin twbs/bootstrap-npm-starter template repository ah kal rawh. Sass compiler, Autoprefixer, Stylelint, PurgeCSS, leh Bootstrap Icons te a awm bawk.

Sass a ni

Bootstrap hian kan Sass source files te CSS files (kan build process-a tel)-a compile nan Dart Sass a hmang a, mahni asset pipeline hmanga Sass i compile a nih chuan chutiang bawk chu ti turin kan fuih a che. Tun hma chuan Bootstrap v4 atan Node Sass kan hmang thin a, mahse LibSass leh a chunga package siam te, Node Sass telin te chu tunah chuan hman tawh loh a ni tawh

Dart Sass hian rounding precision 10 a hmang a, efficiency avang hian he value hi siamrem a phal lo. Kan CSS siam chhuah tawhte processing dang kan neih laiin, minification lai ang chiah khan he precision hi kan tihhniam lo a, mahse i duh chuan browser rounding-a harsatna awm lo turin precision 6 tal vawng reng turin kan rawt a ni.

Autoprefixer hmanga siam a ni

Bootstrap hian Autoprefixer (kan build process-a tel) hmangin build time-ah CSS property thenkhatah vendor prefix chu automatic-in a dah belh thin. Chutianga kan tih chuan kan CSS a key parts te chu vawi khat ziah theihna a siamsak a, chutih rualin v3-a hmuh ang vendor mixin hman a ngai tawh lo.

Autoprefixer hmanga support browser list chu kan GitHub repository chhungah file hranah kan enkawl a. A chipchiar zawkna chu .browserslistrc ah hian en rawh .

RTLCSS a ni

Bootstrap hian RTLCSS hmangin CSS compiled te chu processin RTL ah a chantir thin – a bul berah chuan horizontal direction aware properties (eg. padding-left) te chu an opposite hmangin a thlak a ni. Kan CSS vawi khat chauh ziah theihna leh RTLCSS control leh value directive hmanga tweak tenau te siam theihna a ni.

Tualchhung documentation siam a ni

Kan documentation local-a kalpui tur chuan Hugo hman a ngai a, chu chu hugo-bin npm package hmangin install a ni. Hugo hi blazingly fast leh quite extensible static site generator a ni a, min pe a: basic includes, Markdown-based files, templates, leh a dangte. A bul tan dan tur chu hetiang hi a ni:

  1. A chunga tooling setup hi run la, dependencies zawng zawng install rawh.
  2. Root /bootstrapdirectory atang npm run docs-servechuan command line ah run rawh.
  3. I browser ah khan hawng la http://localhost:9001/, voilà.

Hugo hman dan tur chu a documentation chhiar la .

Harsatna chinfel dan

Dependency install-naah harsatna i tawh chuan a hmaa dependency version (global leh local) zawng zawng uninstall vek tur a ni. Tichuan, rerun npm installrawh .