Slide 1

Slide 1 text

Automating Theme Development LoopConf 2015 Zoe Rooney @zoe_rooney

Slide 2

Slide 2 text

WHY WOULD I WANT TO AUTOMATE?

Slide 3

Slide 3 text

WHY WOULD I WANT TO AUTOMATE? WOULDN’T

Slide 4

Slide 4 text

HERD BEHAVIOR ROBOTS TAKING OVER

Slide 5

Slide 5 text

- B. F. Skinner “The real problem is not whether machines think but whether men do.”

Slide 6

Slide 6 text

1. Make note of your process 2. Identify and replace points of pain or annoyance

Slide 7

Slide 7 text

TOO MUCH TO LEARN

Slide 8

Slide 8 text

- SirArthur C. Clarke “Any sufficiently advanced technology is indistinguishable from magic.”

Slide 9

Slide 9 text

HOW DO I AUTOMATE? PROJECT SETUP ACTIVE WORK DEPLOY CODE

Slide 10

Slide 10 text

HOW DO I AUTOMATE? PROJECT SETUP ACTIVE WORK DEPLOY CODE

Slide 11

Slide 11 text

1. Find and replace; loooooong CSS files
 2. CanIUse-ing browser prefixes
 3. Optimize images; lint, organize, minify JS ACTIVE WORK

Slide 12

Slide 12 text

1. Find and replace; loooooong CSS files
 2. CanIUse-ing browser prefixes
 3. Processing things like Sass, or running other tasks ACTIVE WORK

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

PARTIALS

Slide 15

Slide 15 text

PARTIALS NESTING

Slide 16

Slide 16 text

#primary { float: left; width: 600px; &.right { float: right; } &.full-width { float: none; width: 100%; } h1 { text-align: center; } }

Slide 17

Slide 17 text

PARTIALS NESTING VARIABLES

Slide 18

Slide 18 text

$bg: #fff; // Dimensions $max-width: 1100px; $side-padding: 15px; $max-outer-width: $width + $side-padding // Typography $main: 'Open Sans', sans-serif; $text: #333; // Media Queries $m: 880px; $s: 760px; $xs: 480px;

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

PACKAGE.JSON GULPFILE.JS

Slide 24

Slide 24 text

{ "repository": { "type": "git", "url": "https://github.com/zoerooney/Emi" }, "dependencies": { "gulp": "*", "gulp-ruby-sass": "*", "gulp-autoprefixer": "*", "gulp-minify-css": "*", "gulp-livereload": "*" } }

Slide 25

Slide 25 text

gulpfile.js

Slide 26

Slide 26 text

$ gulp styles

Slide 27

Slide 27 text

$ gulp watch

Slide 28

Slide 28 text

HOW DO I AUTOMATE? PROJECT SETUP ACTIVE WORK DEPLOY CODE

Slide 29

Slide 29 text

1. Get the starter theme (_s, Bones, Emi)
 2. Replace text strings throughout 3. Install tools via NPM PROJECT SETUP

Slide 30

Slide 30 text

1. Get the starter theme (_s, Bones, Emi)
 2. Replace text strings throughout 3. Install tools via NPM PROJECT SETUP

Slide 31

Slide 31 text

YEOMAN.IO

Slide 32

Slide 32 text

theme-folder

Slide 33

Slide 33 text

index.js

Slide 34

Slide 34 text

HOW DO I AUTOMATE? PROJECT SETUP ACTIVE WORK DEPLOY CODE

Slide 35

Slide 35 text

1. Push changes to version control
 2. Upload files to remote
 
 DEPLOYING

Slide 36

Slide 36 text

1. Push changes to version control
 2. Upload files to remote
 
 DEPLOYING

Slide 37

Slide 37 text

$ git init $ git add -A $ git commit -m "initial commit" theme-folder

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

$ git commit -m "let's do this thing" $ git push

Slide 41

Slide 41 text

LEVEL UP

Slide 42

Slide 42 text

INSTALL ALL THE THINGS ‣ Node.js via nodejs.org ‣ Ruby (PC only, comes with Macs) ‣ Sass via sass-lang.com directions ‣ Git via instructions on git- scm.com ‣ Gulp via NPM ‣ Yeoman via NPM

Slide 43

Slide 43 text

GRAB A PROJECT AND PLAY AROUND

Slide 44

Slide 44 text

GRAB A PROJECT AND PLAY AROUND http://bit.ly/emi-theme

Slide 45

Slide 45 text

Automating is about replacing grunt work with magic. Slides @ http://bit.ly/loop-automate