1 Teb. Jest/Enzyme tsuas yog yuav tsum tau thaum lub sij hawm kev loj hlob, yog li yuav tsum tau txais kev cawmdim li devDependencies.
Dab tsi yuav tsum yog kev vam khom?
Qee yam piv txwv zoo ntawm kev vam khom uas yuav tsum tau ua thaum lub sijhawm ua haujlwm suav nrog React, Redux, Express, thiab Axios Qee qhov piv txwv zoo ntawm thaum yuav nruab devDependencies yuav yog Nodemon, Babel, ESLint, thiab kuaj lub moj khaum zoo li Chai, Mocha, Enzyme, thiab lwm yam… Lwm zaus, peb yuav khawb tob rau hauv peb pob. json filer.
Kuv yuav tsum siv Dev kev vam meej?
Nyob rau hauv luv luv, koj yuav tsum txuag ib module raws li ib tug devDependency thaum nws tsuas yog siv rau kev loj hlob thiab kev sim; txhua yam yuav tsum yog kev vam khom.
Thaum twg yuav tsum muaj kev vam khom rau tus dev?
Thaum koj ntxiv tus chij -D, lossis --save-dev, koj tab tom txhim kho nws ua qhov kev vam khom, uas ntxiv nws rau cov npe devDependencies. Kev txhim kho kev vam khom yog npaj raws li kev txhim kho-tsuas yog pob khoom, uas tsis xav tau hauv kev tsim khoom. Piv txwv li kuaj pob, webpack lossis Babel.
Yuav tsum yog hom prop yog kev vam khom?
'prop-types' yuav tsum tau teev nyob rau hauv qhov project dependencies, tsis yog devDependencies.