Mission Control:
- Restructured asset directory
- Removed rev-manifest and unique-asset creation
- Convert js compilation to Rollup
- Simplified lib directory
- Add theme config for gulp, as well as local config for browsersync
Stack:
- Updated Composer dependency versions
Apollo is a two stage unit: A WordPress Stack built with Composer, and a Starter Theme packed with Sass, Gulp, Bower, and a Theme Wrapper structure.
Versions listed are required to be equal to or greater than.
- PHP v5.4.3
- [Composer] (https://getcomposer.org/) v1.0.0-alpha8
Versions listed are required to be equal to or greater than.
- [Node] (https://nodejs.org/) v0.10.0
- [NPM] (https://www.npmjs.com/) v2.1.5
- PHP v5.4.3
Global NPM Packages:
- Gulp v3.9.1^
npm install -g gulp - Browsersync v2.11.1^
npm install -g browser-sync
Make sure you have everything listed in the above requirements installed & download this repo (or clone it and change the remote repo url).
- Open your terminal,
cdinto the directory you just cloned (base directory). - Edit
composer.jsonto add plugins as needed. See Adding Plugins - Run
composer create-project - If developing locally: point local hosts to the base directory.
- Edit the
wp-configthat is created in the base directory with your database and url credentials. - Change the name of the Theme (
app/themes/mission-control) as needed. - Edit the
style.cssfile in the theme directory with your own information as needed - Open the
gulpfile.jsfile and edit thedevUrlvariable to match your host url. cdto the theme directory and runnpm install. Thegulptask should run at the end of installation.- Run
gulp --productionto complete theme initialization forstagingandproductionenviornments - Start coding. Shoot for the moon.
Apollo creates a stack that defers from a typical WordPress install. Apollo uses Composer to build out a managed instance, so the file structure is changed a bit. wp-content (themes, plugins, uploads, etc.) is redirected to app. WordPress files live in wp.
You should never edit files in wp, as changes are not tracked in git. Additionally, files in app/plugins, app/uploads, and app/mu-plugins are not tracked in git. Why? Because plugins and mu-plugins are managed through composer, and uploads are costly files to track in git. It's the price of automation :)
Note: Due to the setup of the stack, Apollo does not play well in enviornments where a typical WordPress install is expected (such as using CiviCRM or Pantheon for deployment).
Apollo creates a wp-config file in the base project directory. Edit the database configuration as normal. Update the WP_HOME and WP_SITEURL definitions to match your enviornment urls. WP_SITEURL should always end with /wp.
Environments are controlled via the WP_ENV definition in wp-config.php and should be one of the following options:
developmentstagingproduction
This definition controls how errors are output and whether or not certain functions should be ran. Local development? Use development. Site running live? Use production. Testing on a staging server?...take a guess.
See lib/config/apollo-config.php.
Apollo uses the [John Bloch Composer Repo] (https://github.com/johnpbloch/wordpress-core-installer) to install WordPress. To update WP, simply update the version of "johnpbloch/wordpress" in composer.json to match the version of WordPress you would like.
Apollo's composer.json is setup to connect with the [WordPress Packagist] (http://wpackagist.org/) library. If you want to use a plugin, find it in the WordPress plugin repo, and copy the slug. In composer.json, add the plugin slug prepended by wpackagist-plugin/ and its version in the require array.
Example:
"wpackagist-plugin/duplicate-post": "~2.6",
Theme docs are maintained here.
Report all issues [here] (https://github.com/t-minus-ten/apollo/issues)
This project is heavily influenced by [Bedrock] (https://github.com/roots/bedrock) and [Sage] (https://github.com/roots/sage) by the [Roots] (https://roots.io/) team. A lot of the code here has been adopted from or inspired by those projects, such as [the wrapper] (https://roots.io/sage/docs/theme-wrapper/).