With Simon Owen / @s10wen
I'm Simon Owen, a Front-End Developer.
I run a monthly meetup in Manchester, McrFRED.
I'm not 12.
Yes, I know I look young.
Yes, I do have my ID.
Working at Carbon Creative.
Building sites to help a variety of businesses.
We love WordPress.
This is only one approach, there's many others.
"Boilerplate code is any seemingly repetitive code that shows up again and again in order to get some result that seems like it ought to be much simpler."
Implementing too much can be risky.
Make improvements in small chunks.
Always be able to carry out your work.
Use version control to avoid risk.
Here I'm using Sequel Pro.
Connect locally to 127.0.0.1
.
Create a new database.
Let's go to:
https://wordpress.org/download/
Right?
Download WordPress as a zip file:
$ wget http://wordpress.org/latest.tar.gz
Unzip WordPress:
$ tar xfz latest.tar.gz
Move the contents of WordPress back a folder:
$ mv wordpress/* ./
Remove the wordpress directory:
$ rmdir wordpress
Remove the zip file:
$ rm -f latest.tar.gz
Go to themes folder:
$ cd wp-content/themes/
Remove twentyfourteen, twentythirteen, twentytwelve themes:
$ rm -rf twenty*
Copy and paste the into a new file,
or from my GitHub gist.
$ bash wordpress-install.sh
.gitconfig
c = clone --recursive
.aliases
alias g="git"
Means:
$ g c git@bitbucket.org:yourname/yourtheme.git
# List all files colorized in long format
alias l="ls -l ${colorflag}"
# Open current directory in Sublime Text
alias s="subl ."
Cmd+T > Start typing out a filename > Enter
In your boilerplate theme (and pretty much any repo) it's worth having a README.md
Hopefully everyone is familiar with Markdown, if not check it out here http://daringfireball.net/projects/markdown/basics
Markdown is a massive time saver. Here's an example of the H5BP's README.md
https://raw.githubusercontent.com/h5bp/html5-boilerplate/master/README.md
Node
Bower and Gulp
$ npm install -g bower gulp
Unicorns and rainbows await. Bear with me.
npm = package.json
bower = bower.json
gulp = gulpfile.js
A whole bunch of awesome, that's what.
First let's install WordPress.
http://sitename.dev/wp-admin/install.php
Activate your theme
Appearance > Themes
Say we want bootstrap?, so we go to:
Right?
Search
$ bower search bootstrap
Install
$ bower install bootstrap-sass-twbs --save
Not only has that now pulled in bootstrap to our theme.
It's also saved it into the `bower.json` file.
So next time when we do `$ bower install` it automatically installs.
With gulp watch
, gulp will watch for changes in the /sass
folder.
With Sass it's possible to split code up into separate files called partials.
Responsive testing.
Quickly get to the app you're after.
Quickly view apps side by side.
@eczarny is ace and helped me out with my dotfiles.
GhostLab + DeviceLab
Modern.ie - The place to go to get old IE browsers.
Automated installation of IE VMs.
Update VB hosts file to point VB to local.
https://www.npmjs.org/package/gulp-minify-css
https://github.com/terinjokes/gulp-uglify
https://www.npmjs.org/package/gulp-imagemin
Images are huuuuge.
With Simon Owen / @s10wen