SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Improving WordPress Theme
Development Workflow
Development Environment
1. Install Docker CE (Community Edition)
2. Create docker-compose.yml
3. docker-compose up -d
4. docker ps
docker-compose.yml
Node Package Manager
npm is a package manager for the JavaScript programming language. It is the default package
manager for the JavaScript runtime environment Node.js. It consists of a command line client, also
called npm, and an online database of public and paid-for private packages, called the npm registry.
With NPM we can install : -
● Task Runners
● Sass/Scss/LeSS Compiler
● Babel
● And many more ;)
Task Runners
A task runner a program that can execute tasks based on specific criteria. Common usages are to set
up a task that runs every time a certain file is changed (or group of files) so you don't have to explicitly
recompile every time, or to restart a server every time you restart the database.
Gulp
Requirement NPM installed that comes with Node.js.
● > npm install gulp -g
● > npm init
● > npm install gulp --save-dev
● > npm install node-sass gulp-sass --save-dev
Sample gulpfile.js
Gulp + Sass
Emmet
SCSS/LESS
Git
Git is a distributed version-control system for tracking changes in source code during software
development. It is designed for coordinating work among programmers, but it can be used to track
changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-
linear workflows.
Push Karo Khush Raho
Github + Travis CI
➔ Check out the code
➔ Build the code
➔ Run tests
➔ Automate deployment
➢ Travis run our unit tests for every push and every pull request.
● ( https://docs.travis-ci.com/user/tutorial/ )
● ( https://github.com/Automattic/_s/blob/master/.travis.yml )
Sample .travis.yml
Start loving CLI ❤️
Installing Plugins/Themes from WordPress Dashboard
WordPress Dashboard > Plugins > Add New > Search Plugin > Press Install Button ( Now Wait for
installation ~_~ ) > Click Activate. x4 for installing four plugins
Installing Plugins/Themes using WP-CLI
> wp plugin search xyz
> wp install monster-widget query-monitor debug-info block-unit-test --activate
Create POT File in second with WP-CLI
> wp i18n make-pot . languages/my-theme.pot
Theme Test
● Plugins
○ Query Monitor By John Blackbourn.
○ Debug This By MachoThemes.
○ Debug Bar By wordpressdotorg
○ Monster Widget By Automattic.
○ Block Unit Test for Gutenberg By Rich Tabor.
● Theme Unit Test Data https://github.com/WPTRT/theme-unit-test .
● Code is Poetry PHPCS for writing clean and beautiful code.
WordPress Gulp Workflow
https://github.com/ahmadawais/WPGulp
WPGULP
# 1— Install WPGulp in your WordPress theme/plugin.
> npx wpgulp
# 2— Now configure variables inside the `wpgulp.config.js` file.
# 3— Start your npm build workflow.
> npm start
What it can do?
● Auto browser reloading.
● SCSS Compiler on save.
● One command to compress all images in theme.
● One command to create pot file.
● One command for RTL stylesheets generator.
● You can customize WPGulp as you want.
Why WPGulp?
● WPGulp is Open Source Project.
● Awesome folks contributed in WPGULP.
● Just one command to get start.
● It will save your time that you invest in doing setup of your Workflow.
● Lots of features.
● Always Updated.
Resources
● https://make.wordpress.org/cli/handbook/installing/
● http://bit.ly/33pOVhH ( Docker Compose File:- WordPress + PhpMyAdmin + WP-CLI)
● https://github.com/ahmadawais/WPGulp
● https://github.com/WordPress/WordPress-Coding-Standards
● https://deliciousbrains.com/deploying-wordpress-plugins-travis/
● https://www.slideshare.net/HardeepAsrani/automating-wordpress-theme-development
Any Question?
My Name is Naveen Kharwar.
➔ From Varanasi.
➔ WordPress and Gatsby Developer.
➔ WordPress Contributor.
➔ Part of Varanasi Foss and WordPress Varanasi
Community
https://twitter.com/naveenkharwar0

Weitere ähnliche Inhalte

Was ist angesagt?

Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...
Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...
Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...
Puppet
 
Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 

Was ist angesagt? (20)

Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
 Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ... Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
Laravel Poznań Meetup #12 - "Speed up web API with Laravel and Swoole using ...
 
Frontend Build Tools - CC FE & UX
Frontend Build Tools - CC FE & UXFrontend Build Tools - CC FE & UX
Frontend Build Tools - CC FE & UX
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
 
Introduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme developmentIntroduction to using Grunt & Bower with WordPress theme development
Introduction to using Grunt & Bower with WordPress theme development
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
 
Configure jasmine and karma for code coverage
Configure jasmine and karma for code coverageConfigure jasmine and karma for code coverage
Configure jasmine and karma for code coverage
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjs
 
Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)Nightwatch.js (vodQA Shots - Pune 2017)
Nightwatch.js (vodQA Shots - Pune 2017)
 
Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...
Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...
Puppet Camp LA 2015: Server Management with Puppet on AWS for a fast-growing ...
 
Wt vs phalcon
Wt vs phalconWt vs phalcon
Wt vs phalcon
 
Docker session III: Dockerfile
Docker session III: DockerfileDocker session III: Dockerfile
Docker session III: Dockerfile
 
Modernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & BowerModernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & Bower
 
Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
 
Deploying Drupal using Capistrano
Deploying Drupal using CapistranoDeploying Drupal using Capistrano
Deploying Drupal using Capistrano
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Production Ready Javascript With Grunt
Production Ready Javascript With GruntProduction Ready Javascript With Grunt
Production Ready Javascript With Grunt
 
Vagrant step-by-step guide for Beginners
Vagrant step-by-step guide for BeginnersVagrant step-by-step guide for Beginners
Vagrant step-by-step guide for Beginners
 
Vagrant
VagrantVagrant
Vagrant
 

Ähnlich wie Improving WordPress Theme Development Workflow - Naveen Kharwar.

PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
Hannes Hapke
 

Ähnlich wie Improving WordPress Theme Development Workflow - Naveen Kharwar. (20)

How to install ReactJS software
How to install ReactJS software How to install ReactJS software
How to install ReactJS software
 
ReactJS software installation
ReactJS software installationReactJS software installation
ReactJS software installation
 
Node.js
Node.jsNode.js
Node.js
 
Magento 2 Development
Magento 2 DevelopmentMagento 2 Development
Magento 2 Development
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build tools
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Grunt training deck
Grunt training deckGrunt training deck
Grunt training deck
 
Grunt and Bower
Grunt and BowerGrunt and Bower
Grunt and Bower
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
#3 Hanoi Magento Meetup - Part 2: Scalable Magento Development With Containers
 
Administer WordPress with WP-CLI
Administer WordPress with WP-CLIAdminister WordPress with WP-CLI
Administer WordPress with WP-CLI
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Docker and DevOps --- new IT culture
Docker and DevOps --- new IT cultureDocker and DevOps --- new IT culture
Docker and DevOps --- new IT culture
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
How to install and configure LEMP stack
How to install and configure LEMP stackHow to install and configure LEMP stack
How to install and configure LEMP stack
 
Getting Started with Docker
Getting Started with Docker Getting Started with Docker
Getting Started with Docker
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 

Kürzlich hochgeladen

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
Kayode Fayemi
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
Kayode Fayemi
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 

Kürzlich hochgeladen (20)

If this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New NigeriaIf this Giant Must Walk: A Manifesto for a New Nigeria
If this Giant Must Walk: A Manifesto for a New Nigeria
 
Dreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio IIIDreaming Music Video Treatment _ Project & Portfolio III
Dreaming Music Video Treatment _ Project & Portfolio III
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, YardstickSaaStr Workshop Wednesday w/ Lucas Price, Yardstick
SaaStr Workshop Wednesday w/ Lucas Price, Yardstick
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Uncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac FolorunsoUncommon Grace The Autobiography of Isaac Folorunso
Uncommon Grace The Autobiography of Isaac Folorunso
 
Causes of poverty in France presentation.pptx
Causes of poverty in France presentation.pptxCauses of poverty in France presentation.pptx
Causes of poverty in France presentation.pptx
 
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
Busty Desi⚡Call Girls in Sector 51 Noida Escorts >༒8448380779 Escort Service-...
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdfAWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
AWS Data Engineer Associate (DEA-C01) Exam Dumps 2024.pdf
 
lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.lONG QUESTION ANSWER PAKISTAN STUDIES10.
lONG QUESTION ANSWER PAKISTAN STUDIES10.
 
My Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle BaileyMy Presentation "In Your Hands" by Halle Bailey
My Presentation "In Your Hands" by Halle Bailey
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Dreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video TreatmentDreaming Marissa Sánchez Music Video Treatment
Dreaming Marissa Sánchez Music Video Treatment
 
Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510Thirunelveli call girls Tamil escorts 7877702510
Thirunelveli call girls Tamil escorts 7877702510
 

Improving WordPress Theme Development Workflow - Naveen Kharwar.

  • 2. Development Environment 1. Install Docker CE (Community Edition) 2. Create docker-compose.yml 3. docker-compose up -d 4. docker ps
  • 4. Node Package Manager npm is a package manager for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js. It consists of a command line client, also called npm, and an online database of public and paid-for private packages, called the npm registry. With NPM we can install : - ● Task Runners ● Sass/Scss/LeSS Compiler ● Babel ● And many more ;)
  • 5. Task Runners A task runner a program that can execute tasks based on specific criteria. Common usages are to set up a task that runs every time a certain file is changed (or group of files) so you don't have to explicitly recompile every time, or to restart a server every time you restart the database.
  • 6. Gulp Requirement NPM installed that comes with Node.js. ● > npm install gulp -g ● > npm init ● > npm install gulp --save-dev ● > npm install node-sass gulp-sass --save-dev
  • 11. Git Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non- linear workflows. Push Karo Khush Raho
  • 12. Github + Travis CI ➔ Check out the code ➔ Build the code ➔ Run tests ➔ Automate deployment ➢ Travis run our unit tests for every push and every pull request. ● ( https://docs.travis-ci.com/user/tutorial/ ) ● ( https://github.com/Automattic/_s/blob/master/.travis.yml )
  • 14. Start loving CLI ❤️ Installing Plugins/Themes from WordPress Dashboard WordPress Dashboard > Plugins > Add New > Search Plugin > Press Install Button ( Now Wait for installation ~_~ ) > Click Activate. x4 for installing four plugins Installing Plugins/Themes using WP-CLI > wp plugin search xyz > wp install monster-widget query-monitor debug-info block-unit-test --activate
  • 15. Create POT File in second with WP-CLI > wp i18n make-pot . languages/my-theme.pot
  • 16. Theme Test ● Plugins ○ Query Monitor By John Blackbourn. ○ Debug This By MachoThemes. ○ Debug Bar By wordpressdotorg ○ Monster Widget By Automattic. ○ Block Unit Test for Gutenberg By Rich Tabor. ● Theme Unit Test Data https://github.com/WPTRT/theme-unit-test . ● Code is Poetry PHPCS for writing clean and beautiful code.
  • 18. WPGULP # 1— Install WPGulp in your WordPress theme/plugin. > npx wpgulp # 2— Now configure variables inside the `wpgulp.config.js` file. # 3— Start your npm build workflow. > npm start
  • 19. What it can do? ● Auto browser reloading. ● SCSS Compiler on save. ● One command to compress all images in theme. ● One command to create pot file. ● One command for RTL stylesheets generator. ● You can customize WPGulp as you want.
  • 20. Why WPGulp? ● WPGulp is Open Source Project. ● Awesome folks contributed in WPGULP. ● Just one command to get start. ● It will save your time that you invest in doing setup of your Workflow. ● Lots of features. ● Always Updated.
  • 21. Resources ● https://make.wordpress.org/cli/handbook/installing/ ● http://bit.ly/33pOVhH ( Docker Compose File:- WordPress + PhpMyAdmin + WP-CLI) ● https://github.com/ahmadawais/WPGulp ● https://github.com/WordPress/WordPress-Coding-Standards ● https://deliciousbrains.com/deploying-wordpress-plugins-travis/ ● https://www.slideshare.net/HardeepAsrani/automating-wordpress-theme-development
  • 23.
  • 24. My Name is Naveen Kharwar. ➔ From Varanasi. ➔ WordPress and Gatsby Developer. ➔ WordPress Contributor. ➔ Part of Varanasi Foss and WordPress Varanasi Community https://twitter.com/naveenkharwar0

Hinweis der Redaktion

  1. Hi everyone, I am Naveen Kharwar and I am just another WordPress Developer from Varanasi, it’s a great honor for me to discuss about my WordPress development workflow. English mein me itna hi rat ke aaya tha... Toh aaplogo mein se kitne logo ne Wordpress themes install