SlideShare a Scribd company logo
WordPress Workflows
and Gulp.js
Live-reloading SASS, JS, and PHP
whoami
Eli McMakin
English major, minor in design
From WA State
Building WordPress sites 3+ years
http://elimcmakin.com/
New Tech
“Things done changed.” – Programmer Notorious BIG
List of Tech
Node – https://nodejs.org/
NPM – https://www.npmjs.com/
Bower – http://bower.io/
SASS and LibSASS – http://sass-lang.com/libsass
BrowserSync – http://www.browsersync.io/
Zurb Foundation – http://foundation.zurb.com/
Gulp.js – http://gulpjs.com/
Um … That’s a lot
Pear it Down
Use jumpstart
My personal WordPress base
https://github.com/elimc/jumpstart
Removes a lot of the code you would need to learn
Branched from Underscores (official WordPress theme)
Uses Foundation, Gulp.js, Bower, Modernizr, and my
custom functions
Lost?
Let’s introduce each technology
Node
Basically, Chromes JavaScript interpreter that can be
ported anywhere
We’ll use it as a server
JS as a Server?
JavaScript Everywhere
Node is Chromes V8 engine
Allows running of JS anywhere (desktop, server, IOT,
Raspberry Pi, Drones, etc …)
NPM
Package Manager for Node
Similar to Bower, Composer, RubyGems, PIP/PyPI,
Maven, etc …
Package managers allow us to download other people’s
code and keep them updated
Bower
Install with NPM
I use it to update Foundation
That’s it
SASS
Syntactically Awesome Style Sheets
Tired of 8000 line CSS files? Abstract them with SASS
Allows variables, importing, nesting, and some other
things
Written in Ruby, originally
SASS Variables
Variables converted to correct CSS during compilation
Importing
Split ginourmous CSS files into something manageable
Nesting
Pre-compiled SASS
Nesting
Post-compiled CSS
LibSASS
We use it to compile SASS into CSS
Based on the Ruby SASS compiler, but written in C/C++
LibSASS
Major speed boost compared to Ruby SASS compile
The timings for processing a 200 KB file of plain CSS
(lower is better, http://www.solitr.com/blog/2014/01/css-
preprocessor-benchmark/):
• Sass: 4.9 sec
• Sass: 2.5 sec (with warm .sass-cache)
• libsass: 0.2 sec
BrowserSync
Live-reloads everything
BrowserSync in action: http://quick.as/az3sxrb
We will combine BrowserSync with Gulp.js
Zurb Foundation
Similar to Bootstrap
I use it to create grids quickly
But mostly, I use it for the JS modules
Don’t write code if you can use someone else’s
Good example is Off-Canvas module:
http://foundation.zurb.com/docs/components/offcanvas.ht
ml
Gulp.js
Basically, faster version of Grunt
Will run tasks for us
Run with BrowserSync to reload pages
Grunt Internals
Convert SASS to CSS and auto-prefix it for browser
compatibility
Files temporarily saved before next step
Gulp Internals
Convert SASS to CSS and auto-prefix it for browser
compatibility
Files “piped” like in Unix
After Putting jumpstart in your
themes directory …
1. Adjust the path of the browserSyncProxy variable in
gulpfile.js.
2. Using the CLI, navigate to the root of your gulpfile.js file
and enter npm install.
3. Wait for the node_modules to automatically install. Once
installed, you won't have to run npm install for this site in
the future.
4. Enter “gulp” in the CLI, without the quotes. This will start
your node server, along with automattic SASS compiling.
5. That's it!
Jumpstart Step 1
Launch Apache server and MySQL database
Find the path to your WordPress install
Replace null with proper path
Set up Dependencies
Enter “npm install” in WP directory in Command Line
Interface
NPM will auto-download and set up modules
Watch Files
Choose files to monitor
For SASS, specify where to put CSS files
Init
Run tasks after “gulp” entered in Command Line
Live-Reload for PHP
When a watched PHP file is saved, we reload it in the
browser
I’ve never seen anyone else use this technique
Start it up!
Just enter Gulp in the CLI
That’s it
*Demonstrate Sexy Browser
Reloading Action
Receive wild applause and roses from crowd
Restarting Gulp
Sometimes gulp breaks if your PHP has compilation errors
Other random breaks
To restart Gulp:
1. Enter ^C in the CLI
2. Then enter “gulp” in the CLI
3. That’s it!
The Future
Instructions still too complex for new WordPress
Developer
Possible integration with Virtual Machine
Will allow one-line development setup with
Vagrant/Puppet
Would allow for handoff of projects to other team
members without needing to instruct them on setting up
their environment
Still exploratory
Thankyou

More Related Content

What's hot (20)

PDF
Modern frontend workflow
Revath S Kumar
 
ODP
Mysql S&M
Rob Kaufman
 
PPT
Ruby On Google App Engine 2nd Athens Ruby Me
Panagiotis Papadopoulos
 
PDF
WebSockets with Spring 4
Sergi Almar i Graupera
 
PDF
High Performance WordPress
vnsavage
 
PPTX
HyperDB, MySQL Performance, & Flavors of MySQL
Evan Volgas
 
PDF
Node.js to the rescue
Marko Heijnen
 
PDF
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
James Stone
 
PDF
Automate All the Things with Grunt
Sheelah Brennan
 
ODP
Choosing a Web Architecture for Perl
Perrin Harkins
 
PDF
A look at FastCgi & Mod_PHP architecture
Aimee Maree
 
PDF
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
KEY
Sprockets
Tim Novinger
 
PDF
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
PPTX
Vagrant
ProfessionalVMware
 
PPTX
PowerShell and SharePoint
Talbott Crowell
 
PDF
Php Performance On Windows
ruslany
 
PPTX
How to install ReactJS software
VigneshVijay21
 
PDF
Real World Progressive Web Apps (Building Flipkart Lite)
Abhinav Rastogi
 
PDF
WAG the Blog
Evan Volgas
 
Modern frontend workflow
Revath S Kumar
 
Mysql S&M
Rob Kaufman
 
Ruby On Google App Engine 2nd Athens Ruby Me
Panagiotis Papadopoulos
 
WebSockets with Spring 4
Sergi Almar i Graupera
 
High Performance WordPress
vnsavage
 
HyperDB, MySQL Performance, & Flavors of MySQL
Evan Volgas
 
Node.js to the rescue
Marko Heijnen
 
Wordpress -> Middleman: Lesson learned in the 2-years since migrating
James Stone
 
Automate All the Things with Grunt
Sheelah Brennan
 
Choosing a Web Architecture for Perl
Perrin Harkins
 
A look at FastCgi & Mod_PHP architecture
Aimee Maree
 
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
Sprockets
Tim Novinger
 
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
PowerShell and SharePoint
Talbott Crowell
 
Php Performance On Windows
ruslany
 
How to install ReactJS software
VigneshVijay21
 
Real World Progressive Web Apps (Building Flipkart Lite)
Abhinav Rastogi
 
WAG the Blog
Evan Volgas
 

Viewers also liked (7)

PDF
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
Kite Koga
 
PDF
Automate your WordPress Workflow with Grunt.js
Josh Lee
 
PDF
Isomorphic WordPress Applications with NodeifyWP
Taylor Lovett
 
PDF
Building a Website The Easy Way With Wordpress
Easily Amused, Inc. & The WP Valet
 
PDF
Intro to WordPress theme development
Thad Allender
 
PDF
Riding The Crazyhorse: Future Generation WordPress
Liz Danzico
 
PDF
WordPress for the modern PHP developer
Chris Sherry
 
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
Kite Koga
 
Automate your WordPress Workflow with Grunt.js
Josh Lee
 
Isomorphic WordPress Applications with NodeifyWP
Taylor Lovett
 
Building a Website The Easy Way With Wordpress
Easily Amused, Inc. & The WP Valet
 
Intro to WordPress theme development
Thad Allender
 
Riding The Crazyhorse: Future Generation WordPress
Liz Danzico
 
WordPress for the modern PHP developer
Chris Sherry
 
Ad

Similar to Word press workflows and gulp (20)

PDF
Ruby on Rails Kickstart 101 & 102
Heng-Yi Wu
 
PPTX
Sass installation
Vinita Swamy
 
PDF
DevOps For Small Teams
Joe Ferguson
 
PDF
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
Luis Rodríguez Castromil
 
PPTX
WordPress automation and CI
Ran Bar-Zik
 
PPTX
Web assembly - Future of the Web
CodeValue
 
PDF
Lightning fast sass
chriseppstein
 
PDF
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
 
PDF
Deploying your rails application to a clean ubuntu 10
Maurício Linhares
 
PPTX
Modern web technologies
Simeon Prusiyski
 
PDF
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
 
PDF
Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
PPTX
A glance at the Rust SWC
Thien Ly
 
PDF
Front End Development Automation with Grunt
Ladies Who Code
 
PDF
Intro to Sails.js
DevOpsDays Austin 2014
 
PDF
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
PDF
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Emerson Eduardo Rodrigues Von Staffen
 
PDF
Introduction of webpack 4
Vijay Shukla
 
PPTX
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
Alexander Dean
 
PPT
Triple Blitz Strike
Denis Zhdanov
 
Ruby on Rails Kickstart 101 & 102
Heng-Yi Wu
 
Sass installation
Vinita Swamy
 
DevOps For Small Teams
Joe Ferguson
 
LuisRodriguezLocalDevEnvironmentsDrupalOpenDays
Luis Rodríguez Castromil
 
WordPress automation and CI
Ran Bar-Zik
 
Web assembly - Future of the Web
CodeValue
 
Lightning fast sass
chriseppstein
 
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
 
Deploying your rails application to a clean ubuntu 10
Maurício Linhares
 
Modern web technologies
Simeon Prusiyski
 
Cool like a Frontend Developer: Grunt, RequireJS, Bower and other Tools
Ryan Weaver
 
Laravel Forge: Hello World to Hello Production
Joe Ferguson
 
A glance at the Rust SWC
Thien Ly
 
Front End Development Automation with Grunt
Ladies Who Code
 
Intro to Sails.js
DevOpsDays Austin 2014
 
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Emerson Eduardo Rodrigues Von Staffen
 
Introduction of webpack 4
Vijay Shukla
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
Alexander Dean
 
Triple Blitz Strike
Denis Zhdanov
 
Ad

Recently uploaded (20)

PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PDF
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PPTX
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
 
PDF
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
PDF
System Center 2025 vs. 2022; What’s new, what’s next_PDF.pdf
Q-Advise
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
Brief History of Python by Learning Python in three hours
adanechb21
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
AI Image Enhancer: Revolutionizing Visual Quality”
docmasoom
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Virtual Threads in Java: A New Dimension of Scalability and Performance
Tier1 app
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Farrell__10e_ch04_PowerPoint.pptx Programming Logic and Design slides
bashnahara11
 
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
System Center 2025 vs. 2022; What’s new, what’s next_PDF.pdf
Q-Advise
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 

Word press workflows and gulp

  • 2. whoami Eli McMakin English major, minor in design From WA State Building WordPress sites 3+ years http://elimcmakin.com/
  • 3. New Tech “Things done changed.” – Programmer Notorious BIG
  • 4. List of Tech Node – https://nodejs.org/ NPM – https://www.npmjs.com/ Bower – http://bower.io/ SASS and LibSASS – http://sass-lang.com/libsass BrowserSync – http://www.browsersync.io/ Zurb Foundation – http://foundation.zurb.com/ Gulp.js – http://gulpjs.com/
  • 7. Use jumpstart My personal WordPress base https://github.com/elimc/jumpstart Removes a lot of the code you would need to learn Branched from Underscores (official WordPress theme) Uses Foundation, Gulp.js, Bower, Modernizr, and my custom functions
  • 9. Node Basically, Chromes JavaScript interpreter that can be ported anywhere We’ll use it as a server
  • 10. JS as a Server?
  • 11. JavaScript Everywhere Node is Chromes V8 engine Allows running of JS anywhere (desktop, server, IOT, Raspberry Pi, Drones, etc …)
  • 12. NPM Package Manager for Node Similar to Bower, Composer, RubyGems, PIP/PyPI, Maven, etc … Package managers allow us to download other people’s code and keep them updated
  • 13. Bower Install with NPM I use it to update Foundation That’s it
  • 14. SASS Syntactically Awesome Style Sheets Tired of 8000 line CSS files? Abstract them with SASS Allows variables, importing, nesting, and some other things Written in Ruby, originally
  • 15. SASS Variables Variables converted to correct CSS during compilation
  • 16. Importing Split ginourmous CSS files into something manageable
  • 19. LibSASS We use it to compile SASS into CSS Based on the Ruby SASS compiler, but written in C/C++
  • 20. LibSASS Major speed boost compared to Ruby SASS compile The timings for processing a 200 KB file of plain CSS (lower is better, http://www.solitr.com/blog/2014/01/css- preprocessor-benchmark/): • Sass: 4.9 sec • Sass: 2.5 sec (with warm .sass-cache) • libsass: 0.2 sec
  • 21. BrowserSync Live-reloads everything BrowserSync in action: http://quick.as/az3sxrb We will combine BrowserSync with Gulp.js
  • 22. Zurb Foundation Similar to Bootstrap I use it to create grids quickly But mostly, I use it for the JS modules Don’t write code if you can use someone else’s Good example is Off-Canvas module: http://foundation.zurb.com/docs/components/offcanvas.ht ml
  • 23. Gulp.js Basically, faster version of Grunt Will run tasks for us Run with BrowserSync to reload pages
  • 24. Grunt Internals Convert SASS to CSS and auto-prefix it for browser compatibility Files temporarily saved before next step
  • 25. Gulp Internals Convert SASS to CSS and auto-prefix it for browser compatibility Files “piped” like in Unix
  • 26. After Putting jumpstart in your themes directory … 1. Adjust the path of the browserSyncProxy variable in gulpfile.js. 2. Using the CLI, navigate to the root of your gulpfile.js file and enter npm install. 3. Wait for the node_modules to automatically install. Once installed, you won't have to run npm install for this site in the future. 4. Enter “gulp” in the CLI, without the quotes. This will start your node server, along with automattic SASS compiling. 5. That's it!
  • 27. Jumpstart Step 1 Launch Apache server and MySQL database Find the path to your WordPress install Replace null with proper path
  • 28. Set up Dependencies Enter “npm install” in WP directory in Command Line Interface NPM will auto-download and set up modules
  • 29. Watch Files Choose files to monitor For SASS, specify where to put CSS files
  • 30. Init Run tasks after “gulp” entered in Command Line
  • 31. Live-Reload for PHP When a watched PHP file is saved, we reload it in the browser I’ve never seen anyone else use this technique
  • 32. Start it up! Just enter Gulp in the CLI That’s it
  • 33. *Demonstrate Sexy Browser Reloading Action Receive wild applause and roses from crowd
  • 34. Restarting Gulp Sometimes gulp breaks if your PHP has compilation errors Other random breaks To restart Gulp: 1. Enter ^C in the CLI 2. Then enter “gulp” in the CLI 3. That’s it!
  • 35. The Future Instructions still too complex for new WordPress Developer Possible integration with Virtual Machine Will allow one-line development setup with Vagrant/Puppet Would allow for handoff of projects to other team members without needing to instruct them on setting up their environment Still exploratory