Skip to content

Commit

Permalink
Merge pull request #14 from 1minus1limited/bump-package-versions
Browse files Browse the repository at this point in the history
Update packages & CMB2
  • Loading branch information
Harry Finn committed May 19, 2017
2 parents bc7914f + caa97eb commit d90ba70
Show file tree
Hide file tree
Showing 6 changed files with 619 additions and 854 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "includes/CMB2"]
path = includes/CMB2
url = [email protected]:WebDevStudios/CMB2.git
50 changes: 27 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Skeleton Wordpress Theme
# Skeleton WordPress Theme

This repository contains a skeleton wordpress theme powered by brunch.
This repository contains a skeleton WordPress theme powered by brunch.
It uses yarn to compile and process packages and assets.

## Prerequisites
Expand All @@ -22,14 +22,14 @@ If you do not have a version of `php` installed or is below version `7.x.x`,
please upgrade it. `php 7` is recommended due to the performance improvements,
view an upgrade guide [here](https://developerjack.com/blog/2015/12/11/Installing-PHP7-with-homebrew/)

##To create a new Wordpress project:
## To create a new WordPress project:

```TXT
mkdir your-wordpress-folder && cd your-wordpress-folder
wp core download --locale=en_GB
```

##Clone this repo into a new theme in your Wordpress folder:
## Clone this repo into a new theme in your WordPress folder:

```TXT
cd wp-content/themes && rm -rf twenty*
Expand All @@ -39,23 +39,24 @@ yarn
```

Note: the `rm -rf twenty*` simply removes the default WordPress themes as they
are not required. The `yarn` command installs all the dependancies for this skeleton.
are not required. The `yarn` command installs all the dependancies for this
skeleton.

You can now branch from master to make changes in this repo.

To create a new wordpress theme repo from this skeleton run the following command
to delete the current git files.
To create a new WordPress theme repo from this skeleton run the following
command to delete the current git files.

```TXT
rm -rf .git
```

You can now create your new wordpress theme repository, following the repository
You can now create your new WordPress theme repository, following the repository
setup instructions on github.
Once setup please ensure you amend the values in the `includes/constants.php`
file to suit your theme.

##Running the project
## Running the project

To start the mysql server use `mysql.server start` and `mysql.server stop`
to stop. The default settings for a mysql connection are:
Expand All @@ -68,10 +69,10 @@ port: 3306
```

Use the mysql settings to make a new database for the project and complete the
wordpress install at `http://localhost:8080`.
WordPress install at `http://localhost:8080`.

There are serveral commands available within this repo which are run as yarn scripts
(recommend running in separate tabs in order to monitor output):
There are several commands available within this repo which are run as yarn
scripts (recommend running in separate tabs in order to monitor output):

- `yarn run server` - will start the PHP built-in web server allowing for
access to the site via `http://localhost:8080`
Expand Down Expand Up @@ -107,20 +108,23 @@ When entering these database details into the WordPress setup screen, ensure
that the host field is set to `127.0.0.1` rather than `localhost` otherwise you
will receive a connection error.

When adding node packages to this repo, the `--save` option should be used unless the
package contents will only ever be used within the dev environment
(`devDependencies`). For example, the `auto-reload-brunch` offers local
reloading of pages to show instant styling changes, which would not be suitable
for a live server environment.
When adding node packages to this repo, the `--dev` option should be used for
any packages that are required to run the development environment, prior to the
build/compilation of the app. Otherwise, if a package affects the way in which
the code is written, it should sit under the `dependencies` section.
For example, the `auto-reload-brunch` offers local reloading of pages to show
instant styling and js changes, which would not be suitable for a live server
environment, therefore should have the `--dev` flag used to add it.

## Install/Update CMB2 within project

This project uses the [CMB2](https://github.com/WebDevStudios/CMB2) library
to help generate and manage custom metaboxes within the WP admin. It is
included within this project via submodule.

To add CMB2 library to the project run the following command within the theme
directory you wish to add the CMB2 library into:
To add CMB2 library to the project (this is not required when using this as a
started framework), run the following command within the theme directory you
wish to add the CMB2 library into:

`git submodule add [email protected]:WebDevStudios/CMB2.git`

Expand All @@ -135,16 +139,16 @@ repo), run the following command: `git submodule update`.
NB: The CMB2 files are not committed directly within this repo as there should
be no reason to change the library code.

##Testing
## Testing

The server will allow for devices connected on the same wifi to access the
site. On your device go to the IP address + `xip.io:8080`.
To find your IP address hold `ALT` and click on the wifi icon in your toolbar.

##Additional Skeleton file notes
## Additional Skeleton file notes

There are several files within this skeleton which contain examples of functionality
for your wordpress theme.
There are several files within this skeleton which contain examples of
functionality for your WordPress theme.

For example:
- `includes/class.custom-post-types.php`
Expand Down
7 changes: 6 additions & 1 deletion brunch-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ module.exports = {
postcss: {
processors: [
require('postcss-import'),
require('autoprefixer')(['last 2 versions', 'iOS 8'])
require('autoprefixer')(['last 2 versions', 'iOS 8']),
require('cssnano')
]
},
sass: {
debug: 'comments',
mode: 'native'
},
babel: {
presets: ['latest'],
pattern: /\.(es6|jsx)$/
}
},
modules: {
Expand Down
2 changes: 1 addition & 1 deletion includes/CMB2
Submodule CMB2 updated from 6dacea to 7699bd
33 changes: 18 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "WPTheme",
"version": "1.0.0",
"version": "1.2.0",
"description": "WordPress theme powered by Brunch",
"author": "1minus1",
"license": "MIT",
Expand All @@ -16,23 +16,26 @@
"caniuse": "doiuse -b 'last 2 versions, iOS 8' -i 'rem, viewport-units, flexbox' public/css/app.css"
},
"dependencies": {
"autoprefixer": "^6.5.3",
"babel-brunch": "^6.0.6",
"css-brunch": "^2.6.1",
"cssnano": "^3.8.1",
"javascript-brunch": "^2.0.0",
"normalize.css": "^5.0.0",
"jquery-isonscreen": "github:harryfinn/isonscreen",
"normalize.css": "^7.0.0",
"owl.carousel": "^2.2.0",
"postcss-brunch": "github:brunch/postcss-brunch#07961d39cecfbc9aa02b48259bb551e56defd4e8",
"postcss-import": "^8.2.0",
"postcss-scss": "^0.4.0",
"reset-css": "^2.2.0",
"sass-brunch": "^2.7.0",
"uglify-js-brunch": "^2.0.1"
"picturefill": "^3.0.2",
"reset-css": "^2.2.0"
},
"devDependencies": {
"auto-reload-brunch": "^2.7.1",
"brunch": "2.10.2",
"doiuse": "^2.5.0"
"autoprefixer": "^7.1.1",
"babel-brunch": "^6.1.1",
"babel-preset-latest": "^6.24.1",
"brunch": "2.10.9",
"css-brunch": "^2.10.0",
"cssnano": "^3.8.1",
"doiuse": "^3.0.0",
"javascript-brunch": "^2.10.0",
"postcss-brunch": "github:brunch/postcss-brunch#07961d39cecfbc9aa02b48259bb551e56defd4e8",
"postcss-import": "^10.0.0",
"postcss-scss": "^1.0.0",
"sass-brunch": "^2.10.4",
"uglify-js-brunch": "^2.10.0"
}
}
Loading

0 comments on commit d90ba70

Please sign in to comment.