understrap / understrap-child

The starter child theme for Understrap, the renowned open-source WordPress starter theme.
GNU General Public License v3.0
580 stars 330 forks source link

Which files do I need to include/exclude from the parent theme understrap? #78

Closed robwakeman closed 7 years ago

robwakeman commented 7 years ago

I’m using your understrap-child theme with understrap as parent.

Which files do I need to include/exclude from the parent theme understrap?

For understrap-child, I can see which files to include for distribution: I just run gulp dist (as shown in your instructions).

Do I need to also run the same command (gulp dist) from the location of the parent directory to compile a dist folder?

For now, I’m just guessing what to exclude from looking at understrap/gulpfile.js

@holger1411 I really appreciate your work on this.

Thanks

holger1411 commented 7 years ago

No, you just need to dist your child theme if you want to pack up a distribution for the child. The parent keeps the same / untouched

robwakeman commented 7 years ago

Ok thanks.

So then, I need to upload the entire parent theme understrap.

So, that would mean including the directories:

And including the files:

I had thought those directories and files were redundant - the site seems to be fine without them, but if not, I'll upload them all too.

holger1411 commented 7 years ago

No you just need to install the parent theme in your WordPress backend via the theme installer. You don´t need the developer resoures on your live system (as long as you develope loacally or on a staging system)

Or you can run the gulp dist in your terminal within your parent them directory. It creates a /dist folder with all needed system files but without all unneeded dev files. Than upload the content of your dist folder into the /wp-content/themes/understrap folder

It also works with the child theme.

robwakeman commented 7 years ago

Ah ok. I noticed that installing via the WP theme installer also installs all the dev files i.e. src directory and gulpfile.js, package.json etc

So, as I’m developing locally, I decided to go via the gulp dist route (for which I needed to run npm install first of course).

Then, I copied all the contents of the dist directory up to the understrap theme directory on the remote server.

That way, it’s a cleaner theme without all the unnecessary dev files.

It all works fine and all makes sense now.

Many thanks.