• Stars
    star
    1,766
  • Rank 26,361 (Top 0.6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An advanced Gulp workflow for WordPress development with extensive documentation. Used by 40,000+ themes and plugins.

๐Ÿ“Ÿ Learn to build CLI DevTools, like WPGulp with me at NodeCLI.com.

WP Gulp ยท WordPress Gulp

WordPress Gulp Workflow

GitHub emoji-log GitHub stars GitHub followers Tweet for help 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 is a package runner tool that comes with npm 5.2+ and higher).

๐ŸŽ› 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 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...

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 is a package runner tool that comes with npm 5.2+ and higher).

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 package.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.
npm run images

# To generate WP POT translation file.
npm run translate

# To generate RTL stylesheets and Sourcemap.
npm run styles-rtl

# To generate theme/plugin zip file without extranious files.
npm run zip

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

Sponsor

Me (Ahmad Awais) and my incredible wife (Maedah Batool) are two engineers who fell in love with open source and then with each other. You can read more about me here. If you or your company use any of my projects or like what Iโ€™m doing then consider backing me. I'm in this for the long run. An open-source developer advocate.

Ahmad on Twitter

NodeCLI.com โ€” Learn to build Node.js CLI Automation

This repository is part of the NodeCLI.com course.

After building hundreds of developer automation tools used by millions of developers, I am sharing exactly how you can do it yourself with minimum effective effort. Learn to build Node.js & JavaScript based CLI (Command Line Interface) apps. Automate the grunt work, do more in less time, impress your manager, and help the community. โ†’ I'm sharing it all in this online video course. Node CLI Automation without wasting a 1,000 hours โ†’

Node CLI Course

Node CLI

Awais on Twitter

๐Ÿ™Œ THEDEVCOUPLE 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

Ahmad on Twitter

More Repositories

1

create-guten-block

๐Ÿ“ฆ A zero-configuration #0CJS developer toolkit for building WordPress Gutenberg block plugins.
JavaScript
3,154
star
2

corona-cli

๐Ÿฆ  Track the Coronavirus disease (COVID-19) in the command line. Worldwide for all countries, for one country, and the US States. Fast response time (< 100ms). To chat: https://twitter.com/MrAhmadAwais/
JavaScript
1,845
star
3

Emoji-Log

Emoji-Log โ€” An Emoji Git commit log messages spec standard. [ ๐Ÿ“ฆ๐Ÿ‘Œ๐Ÿ›๐Ÿ“–๐Ÿš€๐Ÿค– โ€ผ๏ธ]
JavaScript
829
star
4

Gutenberg-Boilerplate

๐Ÿ”ฐ WordPress Gutenberg Boilerplate! โ€” Easy to understand and extensively inline documented starter WordPress plugin for the new Gutenberg editor. Think of it like a create-react-app for WP Gutenberg. โ€”โ€”โ€” I now recommend ๐Ÿ”ฅ โš›โ€ ๐Ÿ“ฆ `create-guten-block` โ†’ https://Awais.dev/cgb
JavaScript
785
star
5

shades-of-purple-vscode

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple to go along with your VSCode. Reviewed by several designers and 75+ theme versions released to keep it updated. One of the top rated best VSCode themes on VS Code Marketplace. Download โ†’
652
star
6

create-node-cli

๐Ÿ“Ÿ CLI to create new Node.js CLI applications in minutes not hours.
JavaScript
628
star
7

awesome-random-stuff

Collection of interesting things I find on the World Wide Web.
387
star
8

VSCode-Tips-Tricks

VSCode-Tips-Tricks Examples and Workflows to help you become a Visual Studio Code Power User โ†’
JavaScript
189
star
9

wp-continuous-deployment

DevOps free Continuous-Deployment pipeline for WordPress plugins with GitHub Actions
JavaScript
170
star
10

ramadan-cli

CLI to check Sehar and Iftar times in Ramadan.
JavaScript
144
star
11

Node-CLI-Tips-Tricks

๐Ÿ“Ÿ NodeCLI.com repo with Node.js CLI best practices and production-ready tips & tricks.
JavaScript
144
star
12

WPGulpTheme

A theme to demonstrate simplest implementation of WPGulp Boilerplate. Practical implementation of WPGulp โ†’
SCSS
140
star
13

Shades-of-Purple-iTerm2

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for iTerm2 & Zsh.
Shell
127
star
14

Advanced-Gulp-WordPress

An Advanced Gulp Workflow for WordPress themes. [๐ŸšจDeprecated in favour of WPGulp https://github.com/ahmadawais/WPGulp | STAR/FORK WPGulp instead]
PHP
122
star
15

WP-OOP-Settings-API

๐Ÿ›  WP-OOP-Settings-API is a Settings API wrapper built with Object Oriented Programming practices.
PHP
97
star
16

WPSass

๐Ÿ• Use Sass with WordPress, Node NPM Script in SCSS flavour. Stop worrying about build tools, use this repo as a base to get started.
CSS
97
star
17

hacktoberfest

#Hacktoberfest + Git Resources | Contributions beginners just like you. Jump in! ๐ŸŽฏ
91
star
18

gatsby-package-manager

Gatsby Package Manager (gpm) helps you install a Gatsby package with all of its dependencies.
JavaScript
91
star
19

_child

_child is a WordPress Child Theme Boilerplate
PHP
86
star
20

WPCustomize

๐ŸŽฉ WP Customize component related boilerplate theme and features implementation. Basic customizer controls, settings, implementation with focus on secure and sanitized data.
PHP
85
star
21

Sendy-PHP-API

๐Ÿš€ Sendy PHP API Wrapper: Complete API interfacing.
PHP
82
star
22

wifi-pswd-cli

Get a saved WiFi password
JavaScript
76
star
23

github-stars-contributions

Log your GitHub Stars Contributions with the ease of a command line CLI
JavaScript
73
star
24

ReSass

๐Ÿ’ป๐Ÿ“ฑ๐Ÿ–ฅ Sass SCSS Responsive Media Queries Mixin for Eight Different Screen Sizes!
CSS
66
star
25

resize-optimize-images

๐Ÿ—ƒ Resize and optimize bmp, gif, jpeg, png, & tiff images in Node.js.
JavaScript
66
star
26

Sublime-WP-Customizer

๐Ÿš€ Sublime Text package of snippets for WordPress Customizer. Helps you write standard WordPress code for Customizer with different kinds of snippets โ€”ย in seconds.
PHP
59
star
27

Shades-of-Purple-Hyper

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Hyper Terminal.
JavaScript
51
star
28

cli-welcome

๐Ÿ“Ÿ Welcome header for Node.js CLI software.
JavaScript
49
star
29

WP-Shortcode-Boilerplate

A standardized, organized, modular foundation for building simple & basic shortcodes in form of a WordPress Plugins.
PHP
49
star
30

cli-alerts

[โœ”๏ธ โ„น๏ธ โš ๏ธ โœ–] Cross platform CLI Alerts with colors & colored symbols for success, info, warning, error. Works on macOS, Linux, and Windows.
JavaScript
47
star
31

Emoji-Log-VSCode

Emoji-Log VSCode Extension โ€” An Emoji Git commit log messages spec standard. [ ๐Ÿ“ฆ๐Ÿ‘Œ๐Ÿ›๐Ÿ“–๐Ÿš€๐Ÿค– โ€ผ๏ธ]
TypeScript
46
star
32

deno-beginner

๐Ÿฆ• Deno examples and projects for the free video course for deno beginners โ†’
TypeScript
42
star
33

Neat

Neat is an advanced WordPress Base theme which uses Gulp, Sass etc. with auto theme package builder.
PHP
38
star
34

WP-REST-Allow-All-CORS

Allow all cross origin requests to your WordPress site's REST API.
PHP
38
star
35

Shades-of-Purple-Slack

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Slack.
34
star
36

this-in-JavaScript

๐Ÿ”ฐ Learn the concept of `this` in JavaScript! โ€” [five concepts]
34
star
37

Styled-Responsive-Media-Queries

Responsive Media Queries for Emotion styled or styled-components โ€” Standard size from Chrome DevTools.
JavaScript
33
star
38

WPAutoPot

๐Ÿ“ฆ Auto Generate WordPress .POT (Portable Objects Template) files via NPM Scripts or Gulp.
JavaScript
32
star
39

cli-meow-help

๐Ÿˆ Generate automagically formatted help text for `meow` CLI app helper.
JavaScript
32
star
40

dotfiles

A non-exhaustive collection of my dotfiles.
Shell
30
star
41

CF7-Customizer

๐Ÿ‘Œ Customize, style and theme your WordPress Contact Forms. An intuitive plugin to design your contact forms via WordPress live customizer, right at the front-end.
PHP
29
star
42

WP-Welcome-Page-Boilerplate

WordPress plugin welcome page boilerplate!
PHP
24
star
43

WP-Salts-Update-CLI

Update WordPress salts through CLI all automated ;)
Shell
23
star
44

Cobalt3-iTerm

Cobalt3 Colour Scheme for iTerm2 + ZSH
Shell
22
star
45

vacation-rentals

It's like AirBNB for WordPress. A massive project that extends WordPress for Vacation Rentals booking, indexing, curating, etc.
PHP
20
star
46

cPanel-EasyEngine-Migrate-CLI

CEM CLI | cPanel to EasyEngine Migrate CLI
Shell
19
star
47

clear-any-console

๐Ÿ“Ÿ Cross platform console clear for your next Node.js CLI
JavaScript
18
star
48

lerna-tutorial

A tutorial for learning lerna.
Shell
18
star
49

shades-of-purple-google-chrome

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Google Chrome.
18
star
50

shades-of-purple-alacritty

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Alacritty.
17
star
51

WPImgOptimizer

WordPress image optimisation development workflow.
JavaScript
17
star
52

scrolls-top

Function that scrolls window to the top, smoothly.
JavaScript
16
star
53

Shades-of-Purple-HighlightJS

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for HighlightJS.
CSS
13
star
54

Proposal-Modern-Tooling

๐Ÿ› ๏ธ A developer build tooling proposal for modern JavaScript based WordPress Core.
13
star
55

get-online-img

๐Ÿ“ฅ Download an image by providing a URL and path in Node.js.
JavaScript
12
star
56

action-auto-changelog

Generate a changelog automatically for your npm packages with GitHub actions.
Shell
12
star
57

Shades-of-Purple-Konsole

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Konsole.
12
star
58

base16-shades-of-purple

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Base16.
11
star
59

tailwind-text-decoration-color

JavaScript
11
star
60

PTCL-CLI-Bash

PTCL-CLI: An intuitive PTCL-CLI to control PTCL routers via command line.
Shell
10
star
61

is-it-git

Checks if the current working directory is a git repository.
JavaScript
10
star
62

cli-handle-error

Custom error handler for Node.js CLIs.
JavaScript
10
star
63

sponsor

๐Ÿ™Œ Sponsor Ahmad Awais on his full-time #OpenSourcerer journey of creating free software.
10
star
64

Twig-Tutorial

Twig Tutorial Theme based on Neat for Tuts+
PHP
10
star
65

GitHub-Fold

๐Ÿ—ƒ๏ธ Google Chrome Extension to fold/unfold GitHub repo files.
JavaScript
10
star
66

learn-react

Learn React.js with Awais.
HTML
10
star
67

ptcl-cli

๐Ÿ“Ÿ Control PTCL router via command line. [Reboot, Get Stats, Screenshot xDSL for complaints].
JavaScript
10
star
68

lwj-cli

Learn with Jason via CLI.
JavaScript
9
star
69

wordle-solved

wordle-solution by Awais
JavaScript
9
star
70

WP-Welcome-Page-Boilerplate-For-TutsPlus

Welcome page plugin boilerplate for Envato Tuts+ tutorial series.
PHP
9
star
71

base16-shades-of-purple-exported-themes

Exported themes from the Shades of Purple for Base16 color scheme.
Vim Script
9
star
72

WPGitDeploy-CLI

Deploy your WordPress plugin from GitHub to WordPress.org SVN repository.
Shell
8
star
73

Shades-of-Purple-IntelliJ

Work in progress Shades of Purple theme for IntelliJ
8
star
74

next-js-blog-with-comments

JavaScript
8
star
75

shades-of-purple-alfred

๐Ÿฆ„ Shades of Purple โ€” A professional theme with hand-picked & bold shades of purple for Alfred App.
8
star
76

wordle-solved-cli

wordle-solved-cli by Awais
JavaScript
8
star
77

nodecli

Node.js CLI Automation
JavaScript
7
star
78

gatsby-plugin-paddle

โš›๏ธ Gatsby plugin that adds paddle.js to your site.
JavaScript
7
star
79

Gutenberg-Multi-Block-Webpack-ES6

WORK IN PROGRESS
JavaScript
7
star
80

sitemaps-compare

Compare two sitemaps by converting them to files with URLs and VSCode
JavaScript
7
star
81

gatsby-minimal-blog

Minimal blog made with React, Gatsby, Styled Components and a lot more.
JavaScript
7
star
82

ahmadawais

Hello, nice to meet you.
7
star
83

DotGitIgnore

My go to .gitignore file.
6
star
84

shadesOfPurpleIntellij

6
star
85

VuePress-Base

VuePress Docs site base with Shades of Purple set up.
6
star
86

has-fetch

Check if the client-side browser has the fetch API support.
JavaScript
6
star
87

Gutenberg-Blocks

โŒ DEPRECATED in the favour of https://github.com/ahmadawais/Gutenberg-Boilerplate
PHP
6
star
88

stuff

๐Ÿ‘€ Random Stuff!
HTML
6
star
89

cli-check-node

Check the installed Node.js version and exit as per the required Node.js version.
JavaScript
6
star
90

is-dir-empty

Check if a directory is empty with Node.js. Promise based.
JavaScript
6
star
91

BR-CLI

BRCLI is a Backup & Restore CLI. It's built for self hosted VPS with EasyEngine for WP websites.
Shell
6
star
92

create-rapid-api

create-rapid-api by Awais
JavaScript
6
star
93

Talk_Personal_Development_for_a_WordPress_Developer

WordPress Meetup Lahore talk: Personal Development for a WordPress Developer
JavaScript
6
star
94

scarfit

Add scarf analytics to a Node pkg, git commit/push, and release an npm patch
JavaScript
6
star
95

wp-release-it

WordPress plugin release automation that works.
JavaScript
5
star
96

next-base

My custom Next.js base to start projects.
JavaScript
5
star
97

with-mdx-remote

JavaScript
5
star
98

gatsby-remark-better-embed-video

๐Ÿ“บ Embed Videos (Youtube, Vimeo, VideoPress) in Gatsby via Markdown with better options.
JavaScript
5
star
99

Woo-Keep-The-Change

Woo Keep The Change plugin helps online store owners keep the change :) i.e. Total $50 instead of $49.28.
PHP
5
star
100

Install-WPGulp

๐Ÿš€ Installs WPGulp for you. Downloads all the required files and installs node packages. [Node >= 8 and npm >= 5.3].
JavaScript
5
star