Vaka maturusi
Dzidza mashandisiro eBootstrap anosanganisirwa npm zvinyorwa kuvaka zvinyorwa zvedu, kuunganidza sosi kodhi, mhanyisa bvunzo, nezvimwe.
Tooling setup
Bootstrap inoshandisa NPM zvinyorwa kune yayo kuvaka system. Yedu package.json inosanganisira nzira dziri nyore dzekushanda nehurongwa, kusanganisira kunyora kodhi, kumhanya bvunzo, nezvimwe.
Kuti ushandise yedu yekuvaka sisitimu uye kumhanyisa zvinyorwa zvedu munharaunda, iwe unozoda kopi yeBootstrap's source mafaera uye Node. Tevera nhanho idzi uye iwe unofanirwa kunge wakagadzirira kuzunungusa:
- Dhawunirodha uye isa Node.js , iyo yatinoshandisa kugadzirisa zvatinovimba nazvo.
- Enda kumudzi
/bootstrap
wedhairekitori uye mhanyanpm install
kuti uise edu emunharaunda anotsamira akanyorwa mu package.json . - Isa Ruby , isa Bundler ne
gem install bundler
, uye pakupedzisira mhanyabundle install
. Izvi zvichaisa zvese zvinoenderana neRuby, seJekyll uye plugins.- Vashandisi veWindows: Verenga gwara iri kuti utore Jekyll uye ashande pasina matambudziko.
Kana wapedza, unokwanisa kumhanyisa mirairo yakasiyana-siyana yakapihwa kubva kumutsara wekuraira.
Kushandisa NPM zvinyorwa
Yedu package.json inosanganisira inotevera mirairo uye mabasa:
Basa | Tsanangudzo |
---|---|
npm run dist |
npm run dist inogadzira /dist dhairekitori nemafaira akaunganidzwa. Inoshandisa Sass , Autoprefixer , uye UgifyJS . |
npm test |
Zvakafanana npm run dist nekuwedzera inomhanyisa bvunzo munharaunda |
npm run docs |
Inovaka uye inoisa CSS uye JavaScript yezvinyorwa. Iwe unogona ipapo kumhanyisa zvinyorwa munharaunda kuburikidza ne npm run docs-serve . |
Mhanya npm run
kuti uone zvese zvinyorwa zvenpm.
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:
- Mhanya nekuseta kwekushandisa kumusoro kuti uise Jekyll (iye muvaki wesaiti) uye kumwe kutsamira kwaRuby ne
bundle install
. - Kubva pamudzi
/bootstrap
wedhairekitori, mhanyanpm run docs-serve
mumutsara wekuraira. - Vhura
http://localhost:9001
mubrowser yako, uye voilà.
Dzidza zvakawanda nezvekushandisa Jekyll nekuverenga zvinyorwa zvayo .
Kugadzirisa matambudziko
Kana iwe ukasangana nezvinetso nekuisa zvinotsamira, bvisa ese ekare anoenderana neshanduro (yepasirese neyemuno). Zvadaro, dzokorora npm install
.