SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
MODERNIZING YOUR WORDPRESS WORKFLOW

WITH GRUNT & BOWER
WHAT WE'LL COVER
Getting used to the terminal
Managing project plugins & frameworks with Bower
Creating tasks in Grunt that will process our CSS, minify and
concatenate our JavaScript, optimize images, and refresh our
browser instantly
COMMON PROBLEMS
FOR THEME DEVELOPERS
HTML / Template Management
CSS Management
JavaScript Management
CSS / JavaScript Concatenation / Minification
Image Optimization
Live Browser Updating
Local Server Environment
TOOLS TO HELP WITH THESE PROBLEMS
HAML, JADE, SLIM, Markdown
LESS, SASS, Stylus
CoffeeScript, LiveScript
WordPress Plugins, GUI Apps - CodeKit, Koala, Hammer
MAMP, LAMP, XAMPP
PROBLEMS BOWER SOLVES
JavaScript Plugin / Framework Management & Updating
PROBLEMS GRUNT SOLVES
All the Rest
GRUNT ADVANTAGES OVER GUIS
Portable with Project
Configurable for Multiple Environments (dev, dist)
Every Detail is Customizable
FOLDER STRUCTURE
hm
tl
/ yu pbi fle
/ or ulc odr
ast
ses
/ teflsyuwl b eiig
/ h ie o il e dtn
└ ls
─ es
└ j
─ s
└ ig
─ m
bwrcmoet / hm t yu Bwrpcae
oe_opnns / oe o or oe akgs
nd_oue
oemdls
/ hm t yu Nd pcae
/ oe o or oe akgs
tp
m
/ hlscnaeae j t ln
/ od octntd s o it
bwrjo
oe.sn
/ tels o yu Bwrpcae
/ h it f or oe akgs
pcaejo
akg.sn
/ tels o yu Nd pcae
/ h it f or oe akgs
Gutiej
rnfl.s
/ weeteGutmgchpes
/ hr h rn ai apn
TERMINAL SETUP FOR FUN++
1. Get iTerm2.
2. Install OhMyZsh with
cr - hts/rwgtu.o/obrselo-yzhmse/ol/ntl.h|s
ul L tp:/a.ihbcmrbyusl/hm-s/atrtosisals
h

3. Install Homebrew with
rb - "(ul-sLhts/rwgtu.o/oerwhmbe/oisal
uy e $cr fS tp:/a.ihbcmHmbe/oerwg/ntl)

4. Get Homebrew up to date and clean by running b e
rw
u d t and b e d c o , then add it to the path with
pae
rw otr
epr PT=/s/oa/i:PT"> ~.ahpoie
xot AH"urlclbn$AH > /bs_rfl

5. Install Node.js with b e i s a l n d
rw ntl oe
6. Install the Grunt CLI with n m i s a l - g u t c i
p ntl g rn-l
7. Install Bower with n m i s a l - b w r
p ntl g oe
BOWER SETUP
Create a file called b w r j o .
oe.sn
{
"ae:"orpoetnm"
nm" yu-rjc-ae,
"eso" ".."
vrin: 100,
"eednis:{
dpnece"
}
}
GRUNT SETUP
Create a file called p c a e j o .
akg.sn
{
"ae:"orpoet,
nm" yu-rjc"
"eso" ".."
vrin: 100,
"eednis:{
dpnece"
}
}
GRUNT CONFIGURATION
Create a file called G u t i e j .
rnfl.s
's src'
ue tit;
mdl.xot =fnto (rn){
oueeprs
ucin gut
gutiiCni(
rn.ntofg{
pg gutfl.edSN'akg.sn)
k: rn.ieraJO(pcaejo',
/ pcaeotoswl g hr
/ akg pin il o ee
};
)
/ rgse tsshr
/ eitr ak ee
gutrgseTs(dfut,[
rn.eitrak'eal'
/ dfutatosg hr
/ eal cin o ee
];
)
}
;
PACKAGES
Get the Bower packages you want from their registry.
CSS PREPROCESSING
You'll want the LESS, SASS, or some other package if your CSS
preference is different.
nmisalgutcnrbls -sv-e
p ntl rn-oti-es -aedv

or
nmisalgutcnrbcmas-sv-e
p ntl rn-oti-ops -aedv
JAVASCRIPT LINTING
Get JSLint.
nmisalgutjln -sv-e
p ntl rn-sit -aedv
JAVASCRIPT FILE CONCATENATION
You'll want this.
nmisalgutcnrbcna -sv-e
p ntl rn-oti-oct -aedv
JAVASCRIPT MINIFICATION
Get Uglify.
nmisalgutcnrbulf -sv-e
p ntl rn-oti-giy -aedv
ERROR NOTIFICATIONS
Try Grunt Notify.
nmisalgutntf -sv-e
p ntl rn-oiy -aedv
IMAGE OPTIMIZATION
I like Imagemin.
nmisalgutcnrbiaei -sv-e
p ntl rn-oti-mgmn -aedv
LIVE UPDATING
You want to use Watch. For updating CSS and JavaScript in the
browser without refreshing the page, get the Chrome extension
LiveReload.
nmisalgutcnrbwth-sv-e
p ntl rn-oti-ac -aedv
SERVER
Want to set up a node.js server for your project and ditch
MAMP? Get Express.
For WordPress, you'll want the PHP version.
With the packages you want registered, the 'Load Tasks' section
of your file should look something like this:
/ La tss
/ od ak
gutlaNmak(gutcnrbcen)
rn.odpTss'rn-oti-la';
gutlaNmak(gutcnrbjhn';
rn.odpTss'rn-oti-sit)
gutlaNmak(gutcnrbcna';
rn.odpTss'rn-oti-oct)
gutlaNmak(gutcnrbulf';
rn.odpTss'rn-oti-giy)
gutlaNmak(gutntf';
rn.odpTss'rn-oiy)
gutlaNmak(gutcnrbwth)
rn.odpTss'rn-oti-ac';
gutlaNmak(gutcnrbiaei';
rn.odpTss'rn-oti-mgmn)
gutlaNmak(gutcnrbcmas)
rn.odpTss'rn-oti-ops';
CONFIGURING OPTIONS
/ pcaeotos
/ akg pin
jhn:{
sit
otos {
pin:
jhnr:'jhnr'/ jhn cni fl
sitc .sitc / sit ofg ie
}
,
al [
l:
'rnfl.s,
Gutiej'
'sesj/.s
ast/s*j'
]
}
,
cna:{
oct
bsc {
ai:
sc [
r:
'oe_opnnsjur/itjur.s,
bwrcmoet/qeyds/qeyj'
'oe_opnnsfudto/sfudto/onainj'
bwrcmoet/onainj/onainfudto.s,
'sesj/anj'
ast/smi.s
]
,
ds:'m/p.s
et tpapj'
}
,
eta:{
xrs
sc [
r:
'oe_opnnsmdrirmdrirj'
bwrcmoet/oenz/oenz.s
]
,
ds:'m/oenz.s
et tpmdrirj'
}
}
,
cmas {
ops:
ds:{
it
otos {
pin:
cni:'ofgr'
ofg cni.b
WATCH
A sample configuration:
wth {
ac:
cmas {
ops:
fls [ast/as*/.ss,as',
ie: 'sesss/**{csss}]
tss [cmas]
ak: 'ops'
}
,
cs {
s:
fls [pbi/ul/s/',
ie: 'ulcbidcs*]
otos {
pin:
lvrla:tu
ieeod re
}
}
,
j:{
s
fls [
ie:
'sesj/.s
ast/s*j'
]
,
tss [cna' 'giy]
ak: 'oct, ulf',
otos {
pin:
lvrla:tu,
ieeod re
aBgn tu
tei: re
}
}
,
iaei:{
mgmn
fls [
ie:
'sesig*'
ast/m/*
]
,
tss [iaei',
ak: 'mgmn]
otos {
pin:
REGISTER DEFAULT TASKS
/ Rgse dfuttss
/ eitr eal ak
gutrgseTs(dfut,[
rn.eitrak'eal'
'ac'
wth
];
)
PUTTING IT ALL TOGETHER
With all of these modules registered and configured, your
Gruntfile.js should look something like this:
's src'
ue tit;
mdl.xot =fnto (rn){
oueeprs
ucin gut
gutiiCni(
rn.ntofg{
pg gutfl.edSN'akg.sn)
k: rn.ieraJO(pcaejo',
/ pcaeotos
/ akg pin
jhn:{
sit
otos {
pin:
jhnr:'jhnr'
sitc .sitc
}
,
al [
l:
'rnfl.s,
Gutiej'
'm/s*j'
tpj/.s
]
}
,
cna:{
oct
bsc {
ai:
sc [
r:
'oe_opnnsjur/itjur.s,
bwrcmoet/qeyds/qeyj'
'oe_opnnsfudto/sfudto/onainj'
bwrcmoet/onainj/onainfudto.s,
'sesj/anj'
ast/smi.s
]
,
ds:'m/p.s
et tpapj'
}
,
GO PLAY

Weitere ähnliche Inhalte

Was ist angesagt?

Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerMohammed Arif
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the webLarry Nung
 
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.jsGDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.jsDominik Prokop
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IOded Sagir
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)Ricardo Castelhano
 
Devenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsDevenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsRémy Savard
 
Automated Development Workflow with Gulp
Automated Development Workflow with GulpAutomated Development Workflow with Gulp
Automated Development Workflow with Gulpplewicki
 
Using the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLIUsing the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLIMarc Gratch
 
MVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js frameworkMVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js frameworkCaesar Chi
 
Building your own personal minion with grunt.js
Building your own personal minion with grunt.jsBuilding your own personal minion with grunt.js
Building your own personal minion with grunt.jsBrent Swisher
 
Node.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deploymentNode.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deploymentCaesar Chi
 
How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityOvadiah Myrgorod
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjsunmesh dusane
 

Was ist angesagt? (20)

Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task Runner
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Yeoman
YeomanYeoman
Yeoman
 
Frontend Build Tools - CC FE & UX
Frontend Build Tools - CC FE & UXFrontend Build Tools - CC FE & UX
Frontend Build Tools - CC FE & UX
 
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.jsGDG Kraków - Intro to front-end automation using bower.js & grunt.js
GDG Kraków - Intro to front-end automation using bower.js & grunt.js
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
When a Sassquatch and a Board get together (or how to use Grunt to chew Sass)
 
Devenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsDevenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.js
 
Yeoman Workflow
Yeoman WorkflowYeoman Workflow
Yeoman Workflow
 
Automated Development Workflow with Gulp
Automated Development Workflow with GulpAutomated Development Workflow with Gulp
Automated Development Workflow with Gulp
 
Npm scripts
Npm scriptsNpm scripts
Npm scripts
 
Using the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLIUsing the Command Line: Bash and WP-CLI
Using the Command Line: Bash and WP-CLI
 
MVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js frameworkMVC way to introduce Sails.js - node.js framework
MVC way to introduce Sails.js - node.js framework
 
Building your own personal minion with grunt.js
Building your own personal minion with grunt.jsBuilding your own personal minion with grunt.js
Building your own personal minion with grunt.js
 
Node.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deploymentNode.js x Azure, cli usage, website deployment
Node.js x Azure, cli usage, website deployment
 
Webpack: from 0 to 2
Webpack: from 0 to 2Webpack: from 0 to 2
Webpack: from 0 to 2
 
How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown University
 
Webpack DevTalk
Webpack DevTalkWebpack DevTalk
Webpack DevTalk
 
Grunt All Day
Grunt All DayGrunt All Day
Grunt All Day
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjs
 

Andere mochten auch

Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsJosh Lee
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structurekeithdevon
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulpEli McMakin
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2Josh Lee
 
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
Gulp WordPress @Grand-Frontend-Osaka 2015 SummerGulp WordPress @Grand-Frontend-Osaka 2015 Summer
Gulp WordPress @Grand-Frontend-Osaka 2015 SummerKite Koga
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPressJosh Lee
 
Isomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPIsomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPTaylor Lovett
 
Intro to WordPress theme development
Intro to WordPress theme developmentIntro to WordPress theme development
Intro to WordPress theme developmentThad Allender
 
Riding The Crazyhorse: Future Generation WordPress
Riding The Crazyhorse: Future Generation WordPressRiding The Crazyhorse: Future Generation WordPress
Riding The Crazyhorse: Future Generation WordPressLiz Danzico
 
WordPress for the modern PHP developer
WordPress for the modern PHP developerWordPress for the modern PHP developer
WordPress for the modern PHP developerChris Sherry
 

Andere mochten auch (12)

Automate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.jsAutomate your WordPress Workflow with Grunt.js
Automate your WordPress Workflow with Grunt.js
 
WordPress Theme Structure
WordPress Theme StructureWordPress Theme Structure
WordPress Theme Structure
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
 
WordPress Development - Taxonomies
WordPress Development -  TaxonomiesWordPress Development -  Taxonomies
WordPress Development - Taxonomies
 
WordPress Theme Development: Part 2
WordPress Theme Development: Part 2WordPress Theme Development: Part 2
WordPress Theme Development: Part 2
 
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
Gulp WordPress @Grand-Frontend-Osaka 2015 SummerGulp WordPress @Grand-Frontend-Osaka 2015 Summer
Gulp WordPress @Grand-Frontend-Osaka 2015 Summer
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
Isomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWPIsomorphic WordPress Applications with NodeifyWP
Isomorphic WordPress Applications with NodeifyWP
 
Building a Website The Easy Way With Wordpress
Building a Website The Easy Way With WordpressBuilding a Website The Easy Way With Wordpress
Building a Website The Easy Way With Wordpress
 
Intro to WordPress theme development
Intro to WordPress theme developmentIntro to WordPress theme development
Intro to WordPress theme development
 
Riding The Crazyhorse: Future Generation WordPress
Riding The Crazyhorse: Future Generation WordPressRiding The Crazyhorse: Future Generation WordPress
Riding The Crazyhorse: Future Generation WordPress
 
WordPress for the modern PHP developer
WordPress for the modern PHP developerWordPress for the modern PHP developer
WordPress for the modern PHP developer
 

Ähnlich wie Modernizing Your WordPress Workflow with Grunt & Bower

Workflow automation for Front-end web applications
Workflow automation for Front-end web applicationsWorkflow automation for Front-end web applications
Workflow automation for Front-end web applicationsMayank Patel
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDAndi Smith
 
Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014Stéphane Bégaudeau
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Stéphane Bégaudeau
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Stéphane Bégaudeau
 
Award-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cacheAward-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cacheUlf Wendel
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With YouDalibor Gogic
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementShapeBlue
 
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
Richard Cole of Amazon Gives Lightning Tallk at BigDataCampRichard Cole of Amazon Gives Lightning Tallk at BigDataCamp
Richard Cole of Amazon Gives Lightning Tallk at BigDataCampBigDataCamp
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Serversupertom
 
Profiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindProfiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindSam Keen
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Ben Hall
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...Evan Mullins
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceQuinlan Jung
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleStein Inge Morisbak
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoidrobin_sy
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...Amazon Web Services
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
Getting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyGetting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyAndré Rømcke
 

Ähnlich wie Modernizing Your WordPress Workflow with Grunt & Bower (20)

Workflow automation for Front-end web applications
Workflow automation for Front-end web applicationsWorkflow automation for Front-end web applications
Workflow automation for Front-end web applications
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED
 
Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014Modern Web Application Development Workflow - web2day 2014
Modern Web Application Development Workflow - web2day 2014
 
Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014Modern Web Application Development Workflow - EclipseCon France 2014
Modern Web Application Development Workflow - EclipseCon France 2014
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
 
Award-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cacheAward-winning technology: Oxid loves the query cache
Award-winning technology: Oxid loves the query cache
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
May The Nodejs Be With You
May The Nodejs Be With YouMay The Nodejs Be With You
May The Nodejs Be With You
 
Ansible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration ManagementAnsible & CloudStack - Configuration Management
Ansible & CloudStack - Configuration Management
 
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
Richard Cole of Amazon Gives Lightning Tallk at BigDataCampRichard Cole of Amazon Gives Lightning Tallk at BigDataCamp
Richard Cole of Amazon Gives Lightning Tallk at BigDataCamp
 
Apache Traffic Server
Apache Traffic ServerApache Traffic Server
Apache Traffic Server
 
Profiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / WebgrindProfiling PHP with Xdebug / Webgrind
Profiling PHP with Xdebug / Webgrind
 
Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)Running Docker in Development & Production (#ndcoslo 2015)
Running Docker in Development & Production (#ndcoslo 2015)
 
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...WordCamp Atlanta -  April 15 2018 - dev team workflow and processes with word...
WordCamp Atlanta - April 15 2018 - dev team workflow and processes with word...
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update Service
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Web Optimization Level: Paranoid
Web Optimization Level: ParanoidWeb Optimization Level: Paranoid
Web Optimization Level: Paranoid
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
Getting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and SymfonyGetting instantly up and running with Docker and Symfony
Getting instantly up and running with Docker and Symfony
 

Kürzlich hochgeladen

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Kürzlich hochgeladen (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Modernizing Your WordPress Workflow with Grunt & Bower

  • 1. MODERNIZING YOUR WORDPRESS WORKFLOW WITH GRUNT & BOWER
  • 2. WHAT WE'LL COVER Getting used to the terminal Managing project plugins & frameworks with Bower Creating tasks in Grunt that will process our CSS, minify and concatenate our JavaScript, optimize images, and refresh our browser instantly
  • 3. COMMON PROBLEMS FOR THEME DEVELOPERS HTML / Template Management CSS Management JavaScript Management CSS / JavaScript Concatenation / Minification Image Optimization Live Browser Updating Local Server Environment
  • 4. TOOLS TO HELP WITH THESE PROBLEMS HAML, JADE, SLIM, Markdown LESS, SASS, Stylus CoffeeScript, LiveScript WordPress Plugins, GUI Apps - CodeKit, Koala, Hammer MAMP, LAMP, XAMPP
  • 5. PROBLEMS BOWER SOLVES JavaScript Plugin / Framework Management & Updating
  • 7. GRUNT ADVANTAGES OVER GUIS Portable with Project Configurable for Multiple Environments (dev, dist) Every Detail is Customizable
  • 8. FOLDER STRUCTURE hm tl / yu pbi fle / or ulc odr ast ses / teflsyuwl b eiig / h ie o il e dtn └ ls ─ es └ j ─ s └ ig ─ m bwrcmoet / hm t yu Bwrpcae oe_opnns / oe o or oe akgs nd_oue oemdls / hm t yu Nd pcae / oe o or oe akgs tp m / hlscnaeae j t ln / od octntd s o it bwrjo oe.sn / tels o yu Bwrpcae / h it f or oe akgs pcaejo akg.sn / tels o yu Nd pcae / h it f or oe akgs Gutiej rnfl.s / weeteGutmgchpes / hr h rn ai apn
  • 9. TERMINAL SETUP FOR FUN++ 1. Get iTerm2. 2. Install OhMyZsh with cr - hts/rwgtu.o/obrselo-yzhmse/ol/ntl.h|s ul L tp:/a.ihbcmrbyusl/hm-s/atrtosisals h 3. Install Homebrew with rb - "(ul-sLhts/rwgtu.o/oerwhmbe/oisal uy e $cr fS tp:/a.ihbcmHmbe/oerwg/ntl) 4. Get Homebrew up to date and clean by running b e rw u d t and b e d c o , then add it to the path with pae rw otr epr PT=/s/oa/i:PT"> ~.ahpoie xot AH"urlclbn$AH > /bs_rfl 5. Install Node.js with b e i s a l n d rw ntl oe 6. Install the Grunt CLI with n m i s a l - g u t c i p ntl g rn-l 7. Install Bower with n m i s a l - b w r p ntl g oe
  • 10. BOWER SETUP Create a file called b w r j o . oe.sn { "ae:"orpoetnm" nm" yu-rjc-ae, "eso" ".." vrin: 100, "eednis:{ dpnece" } }
  • 11. GRUNT SETUP Create a file called p c a e j o . akg.sn { "ae:"orpoet, nm" yu-rjc" "eso" ".." vrin: 100, "eednis:{ dpnece" } }
  • 12. GRUNT CONFIGURATION Create a file called G u t i e j . rnfl.s 's src' ue tit; mdl.xot =fnto (rn){ oueeprs ucin gut gutiiCni( rn.ntofg{ pg gutfl.edSN'akg.sn) k: rn.ieraJO(pcaejo', / pcaeotoswl g hr / akg pin il o ee }; ) / rgse tsshr / eitr ak ee gutrgseTs(dfut,[ rn.eitrak'eal' / dfutatosg hr / eal cin o ee ]; ) } ;
  • 13. PACKAGES Get the Bower packages you want from their registry.
  • 14. CSS PREPROCESSING You'll want the LESS, SASS, or some other package if your CSS preference is different. nmisalgutcnrbls -sv-e p ntl rn-oti-es -aedv or nmisalgutcnrbcmas-sv-e p ntl rn-oti-ops -aedv
  • 16. JAVASCRIPT FILE CONCATENATION You'll want this. nmisalgutcnrbcna -sv-e p ntl rn-oti-oct -aedv
  • 18. ERROR NOTIFICATIONS Try Grunt Notify. nmisalgutntf -sv-e p ntl rn-oiy -aedv
  • 19. IMAGE OPTIMIZATION I like Imagemin. nmisalgutcnrbiaei -sv-e p ntl rn-oti-mgmn -aedv
  • 20. LIVE UPDATING You want to use Watch. For updating CSS and JavaScript in the browser without refreshing the page, get the Chrome extension LiveReload. nmisalgutcnrbwth-sv-e p ntl rn-oti-ac -aedv
  • 21. SERVER Want to set up a node.js server for your project and ditch MAMP? Get Express. For WordPress, you'll want the PHP version.
  • 22. With the packages you want registered, the 'Load Tasks' section of your file should look something like this: / La tss / od ak gutlaNmak(gutcnrbcen) rn.odpTss'rn-oti-la'; gutlaNmak(gutcnrbjhn'; rn.odpTss'rn-oti-sit) gutlaNmak(gutcnrbcna'; rn.odpTss'rn-oti-oct) gutlaNmak(gutcnrbulf'; rn.odpTss'rn-oti-giy) gutlaNmak(gutntf'; rn.odpTss'rn-oiy) gutlaNmak(gutcnrbwth) rn.odpTss'rn-oti-ac'; gutlaNmak(gutcnrbiaei'; rn.odpTss'rn-oti-mgmn) gutlaNmak(gutcnrbcmas) rn.odpTss'rn-oti-ops';
  • 23. CONFIGURING OPTIONS / pcaeotos / akg pin jhn:{ sit otos { pin: jhnr:'jhnr'/ jhn cni fl sitc .sitc / sit ofg ie } , al [ l: 'rnfl.s, Gutiej' 'sesj/.s ast/s*j' ] } , cna:{ oct bsc { ai: sc [ r: 'oe_opnnsjur/itjur.s, bwrcmoet/qeyds/qeyj' 'oe_opnnsfudto/sfudto/onainj' bwrcmoet/onainj/onainfudto.s, 'sesj/anj' ast/smi.s ] , ds:'m/p.s et tpapj' } , eta:{ xrs sc [ r: 'oe_opnnsmdrirmdrirj' bwrcmoet/oenz/oenz.s ] , ds:'m/oenz.s et tpmdrirj' } } , cmas { ops: ds:{ it otos { pin: cni:'ofgr' ofg cni.b
  • 24. WATCH A sample configuration: wth { ac: cmas { ops: fls [ast/as*/.ss,as', ie: 'sesss/**{csss}] tss [cmas] ak: 'ops' } , cs { s: fls [pbi/ul/s/', ie: 'ulcbidcs*] otos { pin: lvrla:tu ieeod re } } , j:{ s fls [ ie: 'sesj/.s ast/s*j' ] , tss [cna' 'giy] ak: 'oct, ulf', otos { pin: lvrla:tu, ieeod re aBgn tu tei: re } } , iaei:{ mgmn fls [ ie: 'sesig*' ast/m/* ] , tss [iaei', ak: 'mgmn] otos { pin:
  • 25. REGISTER DEFAULT TASKS / Rgse dfuttss / eitr eal ak gutrgseTs(dfut,[ rn.eitrak'eal' 'ac' wth ]; )
  • 26. PUTTING IT ALL TOGETHER With all of these modules registered and configured, your Gruntfile.js should look something like this: 's src' ue tit; mdl.xot =fnto (rn){ oueeprs ucin gut gutiiCni( rn.ntofg{ pg gutfl.edSN'akg.sn) k: rn.ieraJO(pcaejo', / pcaeotos / akg pin jhn:{ sit otos { pin: jhnr:'jhnr' sitc .sitc } , al [ l: 'rnfl.s, Gutiej' 'm/s*j' tpj/.s ] } , cna:{ oct bsc { ai: sc [ r: 'oe_opnnsjur/itjur.s, bwrcmoet/qeyds/qeyj' 'oe_opnnsfudto/sfudto/onainj' bwrcmoet/onainj/onainfudto.s, 'sesj/anj' ast/smi.s ] , ds:'m/p.s et tpapj' } ,