योगदान
आमच्या दस्तावेजीकरण स्क्रिप्ट आनी चांचण्यो तयार करपाक Bootstrap विकसीत करपाक मदत करात.
टूलींग सेटअप करप
बूटस्ट्रॅप दस्तावेजीकरण तयार करपाक आनी स्त्रोत फायली संकलित करपाक npm स्क्रिप्ट वापरता. आमच्या package.json कडेन कोड संकलित करपाक, चांचण्यो चालीक लावपाक, आनी हेर खातीर ह्यो स्क्रिप्ट दवरतात. हे आमच्या रिपॉझिटरी आनी दस्तावेजीकरणा भायर वापरपा खातीर नात.
आमची बिल्ड प्रणाली वापरपाक आनी आमचें दस्तावेजीकरण थळाव्यान चालीक लावपाक, तुमकां Bootstrap च्या स्त्रोत फायलींची आनी नोडाची प्रत जाय पडटली. ह्यो पावलां पाळचीं आनी तुमी रॉक करपाक तयार आसूंक जाय:
- Node.js डावनलोड करात आनी प्रतिष्ठापीत करात , जें आमी आमचीं अवलंबन वेवस्थापन करपाक वापरतात.
- एक तर Bootstrap च्या स्रोत डाउनलोड करात वा Bootstrap च्या भंडाराक फोर्क करात .
- मुळाव्या
/bootstrap
निर्देशिकेंत वचचें आनी package.jsonnpm install
त दिल्ल्या आमचीं थळाव्या अवलंबनांक प्रतिष्ठापीत करपाक चालीक लावचें .
पुराय जातकच, तुमकां आदेश ओळींतल्यान दिल्ले वेगवेगळे आदेश चालीक लावंक मेळटले.
npm लिपी वापरप
आमच्या package.json हातूंत प्रकल्प विकसीत करपाखातीर जायतीं कामां आसपावीत केल्यांत. npm run
तुमच्या टर्मिनलांतल्यो सगळ्यो npm स्क्रिप्ट पळोवपाक चालीक लावची . प्राथमीक कामांभितर अशे आसात- १.
काम | वर्णन |
---|---|
npm start |
CSS आनी JavaScript संकलित करता, दस्तावेजीकरण तयार करता, आनी थळावो सर्वर सुरू करता. |
npm run dist |
dist/ संकलित फायलीं आशिल्ली निर्देशिका तयार करता . Sass , Autoprefixer , आनी terser वापरता . |
npm test |
धांवल्या उपरांत थळाव्या स्वरुपांत चांचण्यो चलयताnpm run dist |
npm run docs-serve |
दस्तावेजीकरण थळाव्यान तयार करता आनी चालीक लायता. |
सास
Bootstrap uses Dart Sass for compiling our Sass source files into CSS files (included in our build process), and we recommend you do the same if you’re compiling Sass using your own asset pipeline. We previously used Node Sass for Bootstrap v4, but LibSass and packages built on top of it, including Node Sass, are now deprecated.
Dart Sass uses a rounding precision of 10 and for efficiency reasons does not allow adjustment of this value. We don’t lower this precision during further processing of our generated CSS, such as during minification, but if you chose to do so we recommend maintaining a precision of at least 6 to prevent issues with browser rounding.
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.
RTLCSS
Bootstrap uses RTLCSS to process compiled CSS and convert them to RTL – basically replacing horizontal direction aware properties (e.g. padding-left
) with their opposite. It allows us only write our CSS a single time and make minor tweaks using RTLCSS control and value directives.
Local documentation
Running our documentation locally requires the use of Hugo, which gets installed via the hugo-bin npm package. Hugo is a blazingly fast and quite extensible static site generator that provides us: basic includes, Markdown-based files, templates, and more. Here’s how to get it started:
- Run through the tooling setup above to install all dependencies.
- From the root
/bootstrap
directory, runnpm run docs-serve
in the command line. - Open
http://localhost:9001/
in your browser, and voilà.
Learn more about using Hugo by reading its documentation.
Troubleshooting
Should you encounter problems with installing dependencies, uninstall all previous dependency versions (global and local). Then, rerun npm install
.