/bones-gulp-starter-kit

A WordPress Starter Kit for Bones with Gulp and Docker

Primary LanguageJavaScript

A WordPress Starter Kit for Bones with Gulp and Docker

Getting everything setup can be a real hassle. With this repo you have a complete development environment setup with one single command!

INSTALLATION

  1. Install Docker
  2. Clone this repo
  3. docker-compose up in the root of the cloned repo.
  4. Open localhost:3000 in your browser.

BONES

src is a sub module with the bones repository. This will give a working theme, but you should replace is with a clone or another theme.

ORGANIZATION

This starter kit uses src, build, and dist folders to organize theme development:

  • src: this directory contains the raw material for your theme: templates (src/), PHP includes (src/inc), language files (src/languages), styles (src/scss), scripts (src/js), and images (anywhere under src/). Only edit files in this directory!
  • build: generated by Gulp, this is a working copy of your theme for use in development and testing. Symlink build to your wp-content/themes directory for local development and testing (e.g. if your theme is in ~/dev/themes/my-theme and your local copy of WordPress is installed in ~/dev/localhost/wp you'll want to run ln -s ~/dev/themes/my-theme/build ~/dev/localhost/wp/wp-content/themes/my-theme).
  • dist: short for distribution, this will be the final, polished copy of your theme for production. You will need to manually run gulp dist to create a new distribution. You can also symlink this directory for a final round of testing; just keep in mind that your theme will now be in dist/[project], where [project] is the setting at the top of the Gulp configuration. This project folder is what you will want to deploy to production. (No more weird junk in your themes. Hooray!)

Note: both the build and dist directories are disposable and can be regenerated from the contents of src. You aren't likely to want to edit files in this folders but you may want to open them up to diagnose issues with the build process itself.

DOCKER

This starter kit is so easy and fast thanks to Docker. If you start this starter kit multiple times you need to rename the DB name (WORDPRESS_DB_NAME) in the docker-compose.yml otherwise you will have conflicts. The DB will be shared in case you don't rename it!

THANKS

This starter kit is based on the work of Synapticism. Thank you!

MAINTAINER

Made by Apptiva with ♥️