SlideShare a Scribd company logo
GETTING STARTED WITH 
GRUNT FOR WORDPRESS 
DEVELOPMENT 
David “DANGER” Bisset 
WORDPRESS MEETUP - OCTOBER 2014
What Is A Task Runner? 
A task runner (or build system) is a 
script that executes a list of actions, 
typically using one or more plugins.
WHAT CAN YOU DO? 
PREPROCESSING 
• SASS 
• LESS 
• COFFEESCRIPT
WHAT CAN YOU DO? 
MINIFY 
• CSS 
• JAVASCRIPT
WHAT CAN YOU DO? 
MINIFY
WHAT CAN YOU DO? 
LINT FILES 
• JSHINT 
• JSLINT
WHAT CAN YOU DO? 
LIVE RELOAD CHANGES 
REFRESH BROWSER EACH TIME 
YOU MAKE A CHANGE TO A FILE
WHAT CAN YOU DO? 
Other THINGS: 
• START A WEB SERVER 
• OPTIMIZE IMAGES 
• OUTPUT TO HTML 
• ALMOST ANYTHING!
Popular Task Runners 
• GRUNT.JS 
• GULP.JS 
• CAKE 
• BRUNCH 
• BROCCOLI
LET’S TAKE 
A LOOK 
GRUNT.JS
Why Go With Grunt.JS? 
• Grunt.js is built on Node.js 
• It’s the most popular task runner 
• The community is large (and helpful) 
• Thousands of available plugins 
• Building custom plugins is really easy
GRUNT 
REQUIRES: 
NODE.JS
What Is Node.JS? 
NODE.JS IS JAVASCRIPT THAT RUNS ON A SERVER 
OR A TERMINAL
How Do You Install 
Node.JS? 
HTTP://NODEJS.ORG
NODE.JS 
COMES WITH: 
NPM (NODE PACKAGE MANAGER)
Installing Grunt CLI 
(Command Line Interface) 
npm install -g grunt-cli 
http://gruntjs.com/getting-started
PREPARING A 
NEW GRUNT PROJECT 
package.json
PREPARING A 
NEW GRUNT PROJECT 
Gruntfile.js
Installing 
grunt modules 
Uglify
Installing Uglify 
npm install grunt-contrib-uglify --save-dev 
https://github.com/gruntjs/grunt-contrib-uglify
Go Back To Gruntfile.js 
grunt
Go Back To Gruntfile.js 
grunt uglify
Installing 
grunt modules 
Watch
Installing Uglify 
npm install grunt-contrib-watch --save-dev 
https://www.npmjs.org/package/grunt-contrib-watch
Go Back To Gruntfile.js
How File Matching Works 
// Matches a single file 
files: 'foo.js' 
! 
// Matches an array of files 
files: [ 'foo.js', 'bar.js' ] 
! 
// Matches all files in the dir 
files: '*' 
! 
// Matches all files with a given extension in the dir 
files: '*.js' 
! 
// Matches all files with a given extension in all dirs 
files: '**/*.js' 
! 
// Matches all files w/extension in this dir and one dir deeper 
files: '{,*/}*.js'
Other Cool Links To Check Out 
https://www.npmjs.org/package/grunt-wordpress-deploy 
Deploy a Wordpress instance without pain using Grunt. 
you can define different environments. 
Adapt the Wordpress database to the destination domain.
Other Cool Links To Check Out 
https://github.com/10up/grunt-wp-plugin 
Create a WordPress plugin with grunt-init. 
https://github.com/10up/grunt-wp-theme 
Create a WordPress THEME with grunt-init.
Other Cool Links To Check Out 
https://github.com/roots/roots 
WordPress starter theme based on HTML5 Boilerplate & 
Bootstrap 
https://mondaybynoon.com/grunt-wordpress-theme-development/ 
MORE READING!
THANK YOU. 
David “SHOULD HAVE HAD A V8” Bisset 
davidbisset.com / @dimensionmedia

More Related Content

What's hot (20)

PDF
Git basics
Amit Sawhney
 
PPTX
Introduction to bower
Jitendra Zaa
 
PDF
Git Tutorial
Pranav Kulkarni
 
PPTX
Using multi-tenant WordPress to simplify development
coderaaron
 
PDF
Testing all your code through HipChat in Docker
Mike Pavlenko
 
PDF
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 
PPTX
Git basics
Ashwin Date
 
PDF
Wocker @WordBench Osaka No.41
Kite Koga
 
PDF
.Git for WordPress Developers
mpvanwinkle
 
PPTX
Infrastructure development on windows ldn cd meetup
Owain Perry
 
PDF
Using a Private Git Server for Packaging Software
Chris Jean
 
PDF
Node.js x Azure, cli usage, website deployment
Caesar Chi
 
PPTX
Modern Development Tools
Ye Maw
 
PPT
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
PDF
node-webkit : Make a magic from your a desktop app to desktop app!
욱진 양
 
ODP
Continuous delivery of Windows micro services in the cloud
Owain Perry
 
PDF
node.js app deploy to heroku PaaS
Caesar Chi
 
PPTX
Bringing Javascript to the Desktop with Electron
Nir Noy
 
PDF
Angular Part 3 (Basic knowledge)
Rohit Singh
 
PDF
Teaching a Designer to Use GitHub
Liam Dempsey
 
Git basics
Amit Sawhney
 
Introduction to bower
Jitendra Zaa
 
Git Tutorial
Pranav Kulkarni
 
Using multi-tenant WordPress to simplify development
coderaaron
 
Testing all your code through HipChat in Docker
Mike Pavlenko
 
VCCW - Vagrant based WordPress development environment
Takayuki Miyauchi
 
Git basics
Ashwin Date
 
Wocker @WordBench Osaka No.41
Kite Koga
 
.Git for WordPress Developers
mpvanwinkle
 
Infrastructure development on windows ldn cd meetup
Owain Perry
 
Using a Private Git Server for Packaging Software
Chris Jean
 
Node.js x Azure, cli usage, website deployment
Caesar Chi
 
Modern Development Tools
Ye Maw
 
Dockerizing BDD : Ruby-Cucumber Example
Shashikant Jagtap
 
node-webkit : Make a magic from your a desktop app to desktop app!
욱진 양
 
Continuous delivery of Windows micro services in the cloud
Owain Perry
 
node.js app deploy to heroku PaaS
Caesar Chi
 
Bringing Javascript to the Desktop with Electron
Nir Noy
 
Angular Part 3 (Basic knowledge)
Rohit Singh
 
Teaching a Designer to Use GitHub
Liam Dempsey
 

Viewers also liked (20)

PPT
An Introduction to AngularJs Unittesting
Inthra onsap
 
PDF
Angular js, Yeomon & Grunt
Richard Powell
 
PDF
Mastering Grunt
Spencer Handley
 
ODP
Wrangling the WordPress Template Hierarchy Like a Boss
IntrepidRealist
 
PDF
Grunt js and WordPress
WP Australia
 
PDF
GruntJS + Wordpress
Leonardo Balter
 
PPTX
WordPress Theme Development Workflow with Node.js, Ruby, Sass, Bower and Grunt
Brajeshwar Oinam
 
PPTX
Metadata and me
Nick Sheppard
 
PDF
A Quick and Dirty D3.js Tutorial
Young-Ho Kim
 
PDF
Grunt JS - Getting Started With Grunt
Douglas Reynolds
 
PPTX
Angular 2.0: Getting ready
Axilis
 
PDF
Introduction to Node.js: perspectives from a Drupal dev
mcantelon
 
PDF
Come migliorare le performance di WordPress con il Visual Composer
liciapelliconi.it
 
PPTX
Node.js Patterns for Discerning Developers
cacois
 
PDF
Javascript testing: tools of the trade
Juanma Orta
 
PDF
Building servers with Node.js
ConFoo
 
PDF
Using Composer to create manageable WordPress websites
Anna Ladoshkina
 
KEY
Node.js ― Hello, world! の1歩先へ。
Tatsuya Tobioka
 
KEY
Writing robust Node.js applications
Tom Croucher
 
PDF
WordPress Database: What's behind those 12 tables
Mauricio Gelves
 
An Introduction to AngularJs Unittesting
Inthra onsap
 
Angular js, Yeomon & Grunt
Richard Powell
 
Mastering Grunt
Spencer Handley
 
Wrangling the WordPress Template Hierarchy Like a Boss
IntrepidRealist
 
Grunt js and WordPress
WP Australia
 
GruntJS + Wordpress
Leonardo Balter
 
WordPress Theme Development Workflow with Node.js, Ruby, Sass, Bower and Grunt
Brajeshwar Oinam
 
Metadata and me
Nick Sheppard
 
A Quick and Dirty D3.js Tutorial
Young-Ho Kim
 
Grunt JS - Getting Started With Grunt
Douglas Reynolds
 
Angular 2.0: Getting ready
Axilis
 
Introduction to Node.js: perspectives from a Drupal dev
mcantelon
 
Come migliorare le performance di WordPress con il Visual Composer
liciapelliconi.it
 
Node.js Patterns for Discerning Developers
cacois
 
Javascript testing: tools of the trade
Juanma Orta
 
Building servers with Node.js
ConFoo
 
Using Composer to create manageable WordPress websites
Anna Ladoshkina
 
Node.js ― Hello, world! の1歩先へ。
Tatsuya Tobioka
 
Writing robust Node.js applications
Tom Croucher
 
WordPress Database: What's behind those 12 tables
Mauricio Gelves
 
Ad

Similar to Getting Started With Grunt for WordPress Development (20)

PPTX
Introduction to using Grunt & Bower with WordPress theme development
James Bundey
 
PDF
Workflow automation for Front-end web applications
Mayank Patel
 
PPTX
WordPress automation and CI
Ran Bar-Zik
 
PDF
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
Evan Mullins
 
KEY
Depolying Drupal with Git, Drush Make and Capistrano
libsys
 
PDF
Get Grulping with JavaScript Task Runners (Matt Gifford)
Future Insights
 
PDF
Building your own personal minion with grunt.js
Brent Swisher
 
PDF
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
PDF
Bower & Grunt - A practical workflow
Riccardo Coppola
 
PDF
Django dev-env-my-way
Robert Lujo
 
PPTX
Grunt understanding
Khalid Khan
 
PDF
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
Dominik Prokop
 
PDF
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
PDF
Automate your WordPress Workflow with Grunt.js
Josh Lee
 
PDF
Grunt: the wild boar dev's best friend - WordCamp London 2018
Marco Chiesi
 
PDF
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
PDF
Front End Development Automation with Grunt
Ladies Who Code
 
PPTX
ASP.NET 5 auf Raspberry PI & docker
Jürgen Gutsch
 
PPTX
WordPress Development Environments
Ohad Raz
 
Introduction to using Grunt & Bower with WordPress theme development
James Bundey
 
Workflow automation for Front-end web applications
Mayank Patel
 
WordPress automation and CI
Ran Bar-Zik
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
Evan Mullins
 
Depolying Drupal with Git, Drush Make and Capistrano
libsys
 
Get Grulping with JavaScript Task Runners (Matt Gifford)
Future Insights
 
Building your own personal minion with grunt.js
Brent Swisher
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Bower & Grunt - A practical workflow
Riccardo Coppola
 
Django dev-env-my-way
Robert Lujo
 
Grunt understanding
Khalid Khan
 
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
Dominik Prokop
 
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
Automate your WordPress Workflow with Grunt.js
Josh Lee
 
Grunt: the wild boar dev's best friend - WordCamp London 2018
Marco Chiesi
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Front End Development Automation with Grunt
Ladies Who Code
 
ASP.NET 5 auf Raspberry PI & docker
Jürgen Gutsch
 
WordPress Development Environments
Ohad Raz
 
Ad

More from David Bisset (20)

PDF
WordPress Theme Workshop: Part 0
David Bisset
 
PDF
WordPress Theme Workshop: Part 1
David Bisset
 
PDF
WordPress Theme Workshop: Part 2
David Bisset
 
PDF
WordPress Theme Workshop: Part 3
David Bisset
 
PDF
WordPress Theme Workshop: Part 4
David Bisset
 
PDF
WordPress Theme Workshop: Customizer
David Bisset
 
PDF
WordPress Theme Workshop: CSS/JS
David Bisset
 
PDF
WordPress Theme Workshop: Internationalization
David Bisset
 
PDF
WordPress Theme Workshop: Misc
David Bisset
 
PDF
WordPress Theme Workshop: Widgets
David Bisset
 
PDF
WordPress Theme Workshop: Menus
David Bisset
 
PDF
WordPress Theme Workshop: Sidebars
David Bisset
 
PDF
WordPress Theme Workshop: Theme Setup
David Bisset
 
PPTX
BuddyPress & Higher Education
David Bisset
 
PDF
WordPress Meetup (Davie, FL) - Top 9 April 2016
David Bisset
 
PDF
WordCamp Tampa 2015
David Bisset
 
PDF
BuddyPress v4
David Bisset
 
PDF
WPSessions - Thinking Outside The Box With BuddyPress
David Bisset
 
PDF
SunShine PHP
David Bisset
 
PDF
Building Next Generation Applications With BuddyPress
David Bisset
 
WordPress Theme Workshop: Part 0
David Bisset
 
WordPress Theme Workshop: Part 1
David Bisset
 
WordPress Theme Workshop: Part 2
David Bisset
 
WordPress Theme Workshop: Part 3
David Bisset
 
WordPress Theme Workshop: Part 4
David Bisset
 
WordPress Theme Workshop: Customizer
David Bisset
 
WordPress Theme Workshop: CSS/JS
David Bisset
 
WordPress Theme Workshop: Internationalization
David Bisset
 
WordPress Theme Workshop: Misc
David Bisset
 
WordPress Theme Workshop: Widgets
David Bisset
 
WordPress Theme Workshop: Menus
David Bisset
 
WordPress Theme Workshop: Sidebars
David Bisset
 
WordPress Theme Workshop: Theme Setup
David Bisset
 
BuddyPress & Higher Education
David Bisset
 
WordPress Meetup (Davie, FL) - Top 9 April 2016
David Bisset
 
WordCamp Tampa 2015
David Bisset
 
BuddyPress v4
David Bisset
 
WPSessions - Thinking Outside The Box With BuddyPress
David Bisset
 
SunShine PHP
David Bisset
 
Building Next Generation Applications With BuddyPress
David Bisset
 

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

Getting Started With Grunt for WordPress Development

  • 1. GETTING STARTED WITH GRUNT FOR WORDPRESS DEVELOPMENT David “DANGER” Bisset WORDPRESS MEETUP - OCTOBER 2014
  • 2. What Is A Task Runner? A task runner (or build system) is a script that executes a list of actions, typically using one or more plugins.
  • 3. WHAT CAN YOU DO? PREPROCESSING • SASS • LESS • COFFEESCRIPT
  • 4. WHAT CAN YOU DO? MINIFY • CSS • JAVASCRIPT
  • 5. WHAT CAN YOU DO? MINIFY
  • 6. WHAT CAN YOU DO? LINT FILES • JSHINT • JSLINT
  • 7. WHAT CAN YOU DO? LIVE RELOAD CHANGES REFRESH BROWSER EACH TIME YOU MAKE A CHANGE TO A FILE
  • 8. WHAT CAN YOU DO? Other THINGS: • START A WEB SERVER • OPTIMIZE IMAGES • OUTPUT TO HTML • ALMOST ANYTHING!
  • 9. Popular Task Runners • GRUNT.JS • GULP.JS • CAKE • BRUNCH • BROCCOLI
  • 10. LET’S TAKE A LOOK GRUNT.JS
  • 11. Why Go With Grunt.JS? • Grunt.js is built on Node.js • It’s the most popular task runner • The community is large (and helpful) • Thousands of available plugins • Building custom plugins is really easy
  • 13. What Is Node.JS? NODE.JS IS JAVASCRIPT THAT RUNS ON A SERVER OR A TERMINAL
  • 14. How Do You Install Node.JS? HTTP://NODEJS.ORG
  • 15. NODE.JS COMES WITH: NPM (NODE PACKAGE MANAGER)
  • 16. Installing Grunt CLI (Command Line Interface) npm install -g grunt-cli http://gruntjs.com/getting-started
  • 17. PREPARING A NEW GRUNT PROJECT package.json
  • 18. PREPARING A NEW GRUNT PROJECT Gruntfile.js
  • 20. Installing Uglify npm install grunt-contrib-uglify --save-dev https://github.com/gruntjs/grunt-contrib-uglify
  • 21. Go Back To Gruntfile.js grunt
  • 22. Go Back To Gruntfile.js grunt uglify
  • 24. Installing Uglify npm install grunt-contrib-watch --save-dev https://www.npmjs.org/package/grunt-contrib-watch
  • 25. Go Back To Gruntfile.js
  • 26. How File Matching Works // Matches a single file files: 'foo.js' ! // Matches an array of files files: [ 'foo.js', 'bar.js' ] ! // Matches all files in the dir files: '*' ! // Matches all files with a given extension in the dir files: '*.js' ! // Matches all files with a given extension in all dirs files: '**/*.js' ! // Matches all files w/extension in this dir and one dir deeper files: '{,*/}*.js'
  • 27. Other Cool Links To Check Out https://www.npmjs.org/package/grunt-wordpress-deploy Deploy a Wordpress instance without pain using Grunt. you can define different environments. Adapt the Wordpress database to the destination domain.
  • 28. Other Cool Links To Check Out https://github.com/10up/grunt-wp-plugin Create a WordPress plugin with grunt-init. https://github.com/10up/grunt-wp-theme Create a WordPress THEME with grunt-init.
  • 29. Other Cool Links To Check Out https://github.com/roots/roots WordPress starter theme based on HTML5 Boilerplate & Bootstrap https://mondaybynoon.com/grunt-wordpress-theme-development/ MORE READING!
  • 30. THANK YOU. David “SHOULD HAVE HAD A V8” Bisset davidbisset.com / @dimensionmedia