Best Practice: How to zip base theme post yarn run build:production

When I do a yarn run build:production to make the Sage 9 theme ready for production and distribution to customers on a website it makes sure all CSS and JS is made ready for production.

But how is the best practice to create an installable ZIP-File?

Zipping that entire package isn’t a good idea for sure. Which files and directories should be removed before createing the installable ZIP-File?

Is there a nice a terminal command for that zipping excluding certain folders you are willing to share?

Thanks for your help.

This is what I usually do for Sage 8.

I haven’t played around with Sage 9 yet, so you can change some of attributes -

zip -9 -r --exclude=*.git* --exclude=*node_modules* --exclude=*bower_components* theme/