Home / Web Design / 5. Setup ya Versioning Control ndani ya Theme

5. Setup ya Versioning Control ndani ya Theme

Ili kujua hatua tunazopitia na kujua mabadiliko tunayoyafanya kwenye kazi yetu, pia kurudi kwenye hatua fulani katika kutengeneza, au hata kushirikisha wadau kwa urahisi wengine wakati wa utengenezaji wa theme yetu. Ni vyema tukatumia versioning control, na hapa tutatumia Git.

Na hapa tutafuatilia folder la theme tuu, na sio pamoja ya WordPress nzima. Kwenye video hii tuanza na kutengeneza file la .gitignore. Kuna mafile mengi kwenye theme yetu na kuna baadhi hatuta taka yafuatilia na nitaeleza kidogo.

Tutaanza kwenye kutengeneza file la .gitignore ambalo nimeliteneza ndani ya theme yetu, kumbuka theme zote ziko ndani ya wp-content kisha themes. Kutengeneza file jipya hapa kwenye sublime nita right click na kisha nitachagua New File. Kisha nitabonyesha Ctrl + S ili kusave na nitaandika jina la file kisha nitaclick save.

Sasa mafile au mafolder nitayo yataja hapa Git haita yafuatilia. Kuna mafile au mafolder mawili ambayo sitaki kuyafuatili hapa moja ni mafile au mafolder yote yanayohusiana na node au npm na yanayohusiana na SASS compilation.

Nitaanza na folder la node_modules, hili ni folder ambapo mafile yote ya node yanakokuwa installed. Pia nataka kutofuatilia chochote kuhusu npm-debug.log files na pia mafile yote ya temporary – tmp ambayo hutengenezwa wakati tunafanya kazi.

Sasa haya yanahusiana na node, kwa upande wa SASS, sitofuatilia file la .sass-cache, hili file linakuwa generated wakati tuu SASS Operation inafanya kazi. Na pia sitofuatilia file lolote la css.map.

Haya ni mafile na mafolder ambayo huhitaji yafuatilia kwa sababu yanakuwa generated na SASS au Grunt na huenda ni temporary file. Na hapa unaweza ongeza mengine ukiona huna haja ya fuatilia ni mpangilio wako tuu na vipi unapendelea fanya kazi yako. Lakini hii mistari mitano ni muhimu unapotumia Grunt na SASS. Ni hayo tuu kuhusu Versioning Control tuungane kipindi kijacho.

About Yesaya R. Athuman

Colleagues know me as a highly Creative Software Developer who can always be trusted to come up with the new approach. But I know that client's business come first, and I never try to impose my ideas on others. Instead, I spend a lot of time understanding business and the audience before suggesting ideas. I can (and often do) work well alone, but I'm at my best collaborating with others.

Check Also

Take Your CSS Experience to the Next Level with SASS

Take Your CSS Experience to the Next Level with SASS

Beginners or those who have taken a break from web design for a few years …