Subscribe to a Premium Development Newsletter by TheDevCouple! What is TheDevTakeaway?

If you are a WordPress developer with an advanced level of WordPress development. That is you develop custom WordPress themes and plugins. You’d definitely like this package that about 400 other developers are using. It’s called WPGulp.Β I built it becauseΒ to stop wasting time for doing boring work β€” grunt work β€” myself.Β 

While I have a huge update coming in the next few months, I’d still like you to try it out. It’ll change the way you work πŸ™‚

⚑️ GITHUB: β˜… 1078 β‘‚ 185 β†’

🎯 β€” If 1,000 developers signup here, I will make a video course for WPGulp.

WPGulp WordPress Gulp [![GitHub](https://img.shields.io/wordpress/v/akismet.svg?colorA=D14543&colorB=21759B&maxAge=2592000&style=flat&label=WordPress)](https://github.com/ahmadawais/WPGulp/) [![emoji-log](https://img.shields.io/badge/πŸš€%20Emoji-Log-gray.svg?colorA=D14543&colorB=21759B&style=flat)](https://github.com/ahmadawais/Emoji-Log/) [![GitHub stars](https://img.shields.io/github/stars/ahmadawais/WPGulp.svg?style=social&label=Stars)](https://github.com/ahmadawais/WPGulp/stargazers) [![GitHub followers](https://img.shields.io/github/followers/ahmadawais.svg?style=social&label=Follow)](https://github.com/ahmadawais?tab=followers) [![Tweet for help](https://img.shields.io/twitter/follow/mrahmadawais.svg?style=social&label=Tweet%[email protected])](https://twitter.com/mrahmadawais/) [![VSCode.pro](https://img.shields.io/badge/Supported%20by-VSCode%20Power%20User%20Course%20%E2%86%92-gray.svg?colorA=D14543&colorB=21759B)](https://VSCode.pro "This open source project is supported by VSCode.pro")
WPGulp (WordPress Gulp)
🎯 An advanced & extensively documented Gulp WordPress workflow. Kick-start a build-workflow for your WordPress plugins and themes with Gulp.
A FOSS (Free & Open Source Software) project. Maintained by @AhmadAwais.


πŸ“¦ WPGulp Can Do THATβ„’

WPGulp is an advanced & extensively documented Gulp.js + WordPress workflow. It can help you kick-start a build-workflow for your WordPress plugins and themes with Gulp.js, save you a lot of grunt work time, follow the DRY (Don't Repeat Yourself) principle, and #0CJS Zero-config JavaScript startup but still configurable via wpgulp.config.js file. It is:

  • πŸ₯ž Versioned βœ“
  • 🀠 Updatable βœ“
  • πŸ—ƒ Set of sane-defaults βœ“


πŸ’» DEV ENVIRONMENT

  • Live reload browser with BrowserSync
  • Hotloading styles with CSS Injection

🎨 STYLES

  • Sass to CSS conversion
  • Merging media queries
  • Error handling
  • Auto-prefixing
  • Minification
  • Sourcemaps

πŸŒ‹ JavaScript

  • Concatenation
  • Minification/uglification
  • Separate vendor and custom JS files handling

🌁 IMAGES

  • Minification/optimization of images
  • File types: .png, .jpg, .jpeg, .gif, .svg

πŸ’― TRANSLATION

  • Generates .pot translation file for i18n and l10n

πŸ‘€ WATCHING

  • For changes in files to recompile
  • File types: .css, .html, .php, .js


Start

Getting Started

⚑️ Quick Overview

Run step #1, #2, and #3 quickly in one go β€” Run inside local WP install's theme/plugin folder E.g. /wp.local/wp-content/plugins/your-plugin or /wp.local/wp-content/themes/your-theme directory.

# 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

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

πŸŽ› If you want to study the detailed installation of step #1 , #2, and #3 β€” then take a look at the steps below.


STEP #0 β€” Don't have Node.js + npm installed? Read this. (CLICK TO EXPAND!) In case you are an absolute beginner to the world of `Node.js`, JavaScript, and `npm` packages β€” all you need to do is go to the Node's site [download + install](https://nodejs.org/en/download/) Node on your system. This will install both `Node.js` and `npm`, i.e., node package manager β€” the command line interface of Node.js. You can verify the install by opening your terminal app and typing... ```sh node -v # Results into v9.11.2 β€” make sure you have Node >= 8 installed. npm -v # Results into 6.2.0 β€” make sure you have npm >= 5.3 installed. ```

β†’ STEP #1 β€” Download the Required Files

  1. In the terminal go to the root folder of your WordPress plugin/theme
  2. Run the following command to download all the files in the WPGulp/src folder

It'll take a couple of minutes to install.

npx wpgulp

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

wpgulp install gif

⚠️ I'm assuming that there are no previously present similar files in the root of your folder. Otherwise, you need to merge these very carefully. E.g. You can include the scripts, devDependencies in your current pacakge.json file and so on for other files. If you run the above command all similar files will be overwritten.

β†’ STEP #2 β€” Editing the Project Variables

Configure the project paths and other variables inside the wpgulp.config.js file. This is a compulsory step.

wpgulp config

β†’ STEP #3 β€” Start your project

Once the installation is done, you can open your project (WordPress plugin/theme) folder and run the start script.

npm start

# To stop press CTRL (βŒƒ) + C

wpgulp start

β†’ OPTIONAL STEP #4 β€” More Scripts/Tasks

To optimize images and generate WP POT translation file, or generate a RTL stylesheet you can run the following commands

# To optimize images.
gulp images

# To generate WP POT translation file.
gulp translate

# To generate RTL stylesheets and Sourcemap.
gulp stylesRTL


Update

How to Update?

  1. Download all the latest files in the WPGulp/src folder inside the root folder of your WordPress plugin/theme by running npx install-wpgulp it will overwrite all the wpgulp files.
  2. Open terminal and Install WPGulp's node dependencies by running the npm install commands in the root folder of your WordPress plugin/theme.


Log

Changelog

Read what's πŸ“¦ new, πŸ‘Œ improved, πŸ› fixed, and if πŸ“– docs got updated.

πŸ‘‰ Go read the entire changelog at this link β€” WPGulp Changelog β†’

Nothing's ever complete, so bear with us while we keep iterating towards a better future.

'Coz every night I lie in bed
The brightest colors fill my head
A million dreams are keeping me awake
I think of what the world could be
A vision of the one I see
A million dreams is all it's gonna take
A million dreams for the world we're gonna make ...

... listen to β†’ A million dreams!


Hello

Hello, we're the Dev Couple!

I (Ahmad Awais) am a OSS developer advocate, Full Stack Web Developer and a regular core contributor at WordPress. My significant other (Maedah Batool) is a Technical Project Manager, and she's also a WordPress Core Contributor. Together with our team, we run the TheDevCouple.com.

If you'd like to get insights into our love for open source software, professional full stack development, WordPress community, the growth of JavaScript or growing a family, building, and bootstrapping a business, then subscribe to our premium newsletter called ↣ The WordPress Takeaway!

Support our Open Source Projects! 🎩

If you'd like us to keep producing professional free and open source software (FOSS). Consider paying for an hour of my dev-time. We'll spend two hours on open source for each contribution. Yeah, that's right, you pay for one hour and get both of us to spend an hour as a thank you.


Hello

πŸ™Œ WPCOUPLE PARTNERS

This open source project is maintained by the help of awesome businesses listed below. What? Read more about it β†’


Update

License & Attribution

MIT Β© Ahmad Awais.

This project is inspired by the work of many awesome developers especially those who contribute to this project, Gulp.js, Babel, and many other dependencies as listed in the package.json file. FOSS (Free & Open Source Software) for the win.

ahmadawais MaedahBatool akmur marianrick asharirfan JeremyEnglert
ahmadawais MaedahBatool akmur marianrick asharirfan JeremyEnglert
ajitbohra noplanman cdils selrond EugenioPetulla FrankM1
ajitbohra noplanman cdils selrond EugenioPetulla FrankM1
isaacdanielanderson JeffMatson AdnanMuhib mauryaratan richtabor saqibameen
isaacdanielanderson JeffMatson AdnanMuhib mauryaratan richtabor saqibameen
slushman
slushman

Follow me πŸ‘‹ on Twitter for more updates and questions β†’ Tweet to say Hi

⚑️ GITHUB: β˜… 1078 β‘‚ 185 β†’

πŸ™Œ

SUBSCRIBE TO DEVELOPERS TAKEAWAY!

A Premium Development Newsletter by TheDevCouple! What is TheDevTakeaway?

There are currently no comments.

πŸ™Œ You must have something to say here...