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 ah hian a hnuaia command leh task te hi a awm a:

Tihtur Hrilhfiahna
npm run dist npm run dist/dist/file compiled te nen directory a siam thin . Sass , Autoprefixer leh terser te a hmang thin .
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.

Run la npm run, npm script zawng zawng en rawh.

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 v4 hian kan Sass source files te chu CSS files (kan build process-a tel)-a compile nan Node Sass a hmang a. I asset pipeline hmanga Sass i compile hunah CSS siam ang chiah kha i tawp theih nan, Node Sass-in a tih ang features te tal support thei Sass compiler i hmang a ngai ang. Hei hi hriat tur pawimawh tak a ni a, a chhan chu October 26, 2020 thleng khan LibSass leh a chunga package siam te—Node Sass telin—te chu hman tawh loh a ni tawh .

Sass feature thar zawk emaw CSS standard thar zawk nena inmilna i mamawh chuan Dart Sass hi tunah chuan Sass implementation bulpui ber a ni tawh a, Node Sass nena inmil vek JavaScript API a support tawh bawk (Dart Sass-a GitHub page -a exception tlemte tarlan a ni).

Sass rounding precision chu 6-ah kan tisang a (default-ah chuan Node Sass-ah chuan 5 a ni) browser rounding-a harsatna awm lo turin. Dart Sass i hman chuan hei hi i siamrem ngai tur a ni lo vang, chu compiler chuan rounding precision 10 a hmang a, efficiency vangin siamrem a phal lo.

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 .

Tualchhung documentation siam a ni

Kan documentation local taka 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 zawng zawng (global leh local) kha uninstall vek rawh. Tichuan, rerun npm installrawh .