Cov txheej txheem:

Dab tsi yog bundler hauv Ruby?
Dab tsi yog bundler hauv Ruby?

Video: Dab tsi yog bundler hauv Ruby?

Video: Dab tsi yog bundler hauv Ruby?
Video: Leng Yang - Yog Vim Dab Tsi (Official Full Song | Nkauj Tawm Tshiab) 2020/05/24 2024, Kaum ib hlis
Anonim

Bundler yog dab tsi ? Bundler muab ib puag ncig zoo ib yam rau Ruby tej yaam num los ntawm kev taug qab thiab txhim kho lub pob zeb tiag tiag thiab cov qauv uas xav tau. Bundler yog ib qho kev tawm ntawm kev vam khom ntuj txiag teb tsaus, thiab xyuas kom meej tias lub pov haum koj xav tau nyob rau hauv kev loj hlob, staging, thiab ntau lawm.

Tsis tas li ntawd, puas bundler tuaj nrog Ruby?

Ruby 2.0 thiab RubyGems 2.0 ob leeg xav tau Bundler 1.3 los yog tom qab ntawd.

Kuj Paub, bundler siv rau dab tsi? Module cov bundles yog cov cuab yeej frontend developers siv rau pob JavaScript modules rau hauv ib qho JavaScript cov ntaub ntawv uas tuaj yeem ua tiav hauv qhov browser. Piv txwv ntawm niaj hnub module cov bundles (tsis muaj kev txiav txim tshwj xeeb) yog: webpack, rollup, fusebox, parcel, thiab lwm yam.

Tsis tas li ntawd, kuv yuav siv Ruby bundler li cas?

Kev teeb tsa Bundler

  1. Qhib lub qhov rais terminal thiab khiav cov lus txib nram qab no:
  2. Nkag mus rau koj qhov project root directory.
  3. Nruab tag nrho cov pob zeb uas xav tau los ntawm koj qhov chaw teev tseg:
  4. Hauv koj lub app, thauj khoom ib puag ncig bundled:
  5. Khiav ib qho executable uas tuaj nrog lub pov haum hauv koj pob khoom:

Gemfile Ruby yog dab tsi?

A Gemfile yog ib cov ntaub ntawv peb tsim uas yog siv los piav txog lub pov haum dependencies rau Ruby cov kev pab cuam. Lub pov haum yog ib phau ntawm Ruby code uas peb tuaj yeem rho tawm rau hauv "sau" uas peb tuaj yeem hu tom qab.

Pom zoo: