Closed lilpxl closed 6 years ago
You can run gulp dist-product
this will create a dist-product folder in which everything needed is compiled that should be uploaded. Save the rest for your development though
AMAZING. Thank you, I had no clue.
Actually I guess my question still has some relevance. For a theme that isn't meant for wide distribution there still seems to be a lot of stuff that we wouldn't need to include (gulpfile, composer, etc), is that correct?
@jaredsnider if you run gulp dist
you'll get an even more pared down version that is set up for FTP export but not for production. It will have no sass and none of the source files. Just be sure to keep around your original development directory 😉
@axlright COOL! Thank you 👍
@jaredsnider You're welcome! You can also make a ZIP archive out of that and upload it directly into the Appearance > Themes section of the WordPress admin /wp-admin/ section and activate it from there. I do that often for updating the parent theme. I think you need to keep a stock theme like twentyseventeen around to switch over to while you delete the existing understrap / understrap-child theme, as you can't (I think) replace an active child or parent theme. But this route is good for times when you don't have FTP.
@axlright Or when FTP is painfully, excruciatingly slow :(
Yeap, totally forgot that, sorry! Thanks for chiming in, @axlright !
All good @Thomas-A-Reinert I pretty much forget everything every day ☁️
Do I need to continue to run gulp dist-product to update the dist directory or will it auto update as I work in the development files?
@ZainoLabs it's a one time function, similar to gulp copy-assets
. It is not a watch style function like gulp watch-bs
. You need to run it every time you want to export your content.
My annoyingly slow ftp speeds led me to ask this question... what files are safe to leave out (or more importantly we SHOULD be leaving out) when moving our child theme from local to production. Assuming there are a whole lot of files related to development (node modules, gulpfile, json... even the SCSS files?) that at best aren't necessary and at worst offer some kind of liability when moving to production. If this is the case, could be cool to have all the development related stuff in a single folder so anything not necessary for the live site could easily be excluded. Thanks all!