Thawh
Kan documentation build script leh test hmangin Bootstrap siam turin pui rawh.
Tooling siam dan tur
Bootstrap hian npm script hmangin documentation a siam a, source file a compile bawk. Kan package.json ah hian heng script te hi code compile nan te, test kalpui nan te leh thil dang tam tak a awm a. Hengte hi kan repository leh documentation pawn lama hman tur a ni lo.
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:
- Kan dependency enkawl nan kan hmang thin Node.js download la, install rawh .
- Bootstrap sources te download emaw , Bootstrap repository fork emaw .
- Root
/bootstrap
directory 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 run
I 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. |
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:
- A chunga tooling setup hi run la, dependencies zawng zawng install rawh.
- Root
/bootstrap
directory atangnpm run docs-serve
chuan command line ah run rawh. - 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 zawng zawng (global leh local) kha uninstall vek rawh. Tichuan, rerun npm install
rawh .