Check out example codes for "how to zip a folder but ignore some files". It will help you in understanding the concepts better.

Code Example 1

zip -r myarchive.zip dir1 -x dir1/ignoreDir1/**\* dir1/ignoreDir2/**\*

Learn ReactJs, React Native from akashmittal.com