Source

መሣሪያዎችን ይገንቡ

የእኛን ሰነድ ለመገንባት፣ የምንጭ ኮድ ለማጠናቀር፣ ሙከራዎችን ለማስኬድ እና ሌሎችንም ለመስራት የ Bootstrapን የተካተቱ npm ስክሪፕቶችን እንዴት መጠቀም እንዳለብን ይወቁ።

የመሳሪያ ዝግጅት

Bootstrap ለግንባታ ስርዓቱ የ npm ስክሪፕቶችን ይጠቀማል ። የኛ ፓኬጅ. json ከማዕቀፉ ጋር ለመስራት ምቹ ዘዴዎችን ያካትታል ኮድ ማጠናቀር፣ ሙከራዎችን ማስኬድ እና ሌሎችንም ያካትታል።

የግንባታ ስርዓታችንን ለመጠቀም እና ሰነዶቻችንን በአገር ውስጥ ለማስኬድ የBootstrap የምንጭ ፋይሎች እና መስቀለኛ መንገድ ቅጂ ያስፈልግዎታል። እነዚህን ቅደም ተከተሎች ይከተሉ እና ለመወዝወዝ ዝግጁ መሆን አለብዎት:

  1. የእኛን ጥገኝነቶች ለማስተዳደር የምንጠቀመው Node.js ያውርዱ እና ይጫኑ ።
  2. ወደ ስርወ /bootstrapማውጫው ይሂዱ እና በጥቅልnpm install ውስጥ የተዘረዘሩትን የአካባቢያችንን ጥገኞች ለመጫን ያሂዱ ።
  3. Ruby ን ጫን፣ Bundler ን በ ጫን gem install bundlerእና በመጨረሻ አሂድ bundle install። ይህ እንደ Jekyll እና ተሰኪዎች ያሉ ሁሉንም የሩቢ ጥገኛዎች ይጭናል።
    • የዊንዶውስ ተጠቃሚዎች ፡ ጄኪልን ያለችግር እንዲሰራ እና እንዲሰራ ለማድረግ ይህንን መመሪያ ያንብቡ ።

ሲጨርሱ ከትዕዛዝ መስመሩ የተሰጡ የተለያዩ ትዕዛዞችን ማስኬድ ይችላሉ።

npm ስክሪፕቶችን በመጠቀም

Our package.json includes the following commands and tasks:

Task Description
npm run dist npm run dist creates the /dist/ directory with compiled files. Uses Sass, Autoprefixer, and UglifyJS.
npm test Same as npm run dist plus it runs tests locally
npm run docs Builds and lints CSS and JavaScript for docs. You can then run the documentation locally via npm run docs-serve.

Run npm run to see all the npm scripts.

Autoprefixer

Bootstrap uses Autoprefixer (included in our build process) to automatically add vendor prefixes to some CSS properties at build time. Doing so saves us time and code by allowing us to write key parts of our CSS a single time while eliminating the need for vendor mixins like those found in v3.

We maintain the list of browsers supported through Autoprefixer in a separate file within our GitHub repository. See .browserslistrc for details.

Local documentation

Running our documentation locally requires the use of Jekyll, a decently flexible static site generator that provides us: basic includes, Markdown-based files, templates, and more. Here’s how to get it started:

  1. Run through the tooling setup above to install Jekyll (the site builder) and other Ruby dependencies with bundle install.
  2. From the root /bootstrap directory, run npm run docs-serve in the command line.
  3. Open http://localhost:9001 in your browser, and voilà.

Learn more about using Jekyll by reading its documentation.

Troubleshooting

ጥገኞችን በመጫን ላይ ችግሮች ካጋጠሙዎት ሁሉንም የቀድሞ የጥገኝነት ስሪቶች (ዓለም አቀፍ እና አካባቢያዊ) ያራግፉ። ከዚያ እንደገና ያሂዱ npm install