When I do a
gulp --production to make the Sage 8.5 theme ready for production and distribution to customers on a website it makes sure all CSS and Js is made ready for production.Which is what I need.
Zipping that entire package inside the theme to be distributed however creates a package of like 153MB . Is it correct I can better and should remove the following folders
Two, do you use a nice a terminal command for that zipping excluding certain folders you are willing to share?
Good question, I would like to know as well!
You don’t need any of those folders in production, just the
dist folder that you obtain at the end of the compilation process.
Those folders are required only in your
development workstation to be able to keep developing.
For the zipping part, sorry but I don’t zip it, I just
rsync what I need to the servers.
On a UNIX system you can do:
zip -r archive.zip your-theme-folder -x bower_components/**\* node_modules/**\* assets/**\* .git/**\*
To exclude any directories or files.
I generally do what @Nicolo_Sacchi suggests however and rsync / FTP sync the final files over, excluding what is listed in .gitignore.