Installs WPGulp in a WordPress Theme/Plugin/App folder.
npm install install-wpgulp
WordPress Gulp Workflow
   
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. | |
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_
#### β‘οΈ 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.
``shwpgulp.config.js1β Install WPGulp in your WordPress theme/plugin.
npx install-wpgulp2β Now configure variables inside the
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 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 -vResults into v9.1.0 β make sure you have Node >= 8 installed.
npm -v
$3
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._
`sh
npx install-wpgulp
`(npx comes with npm 5.2+ and higher, see instructions for older npm versions)
> β οΈ 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.$3
Configure the project paths and other variables inside the
wpgulp.config.js file. This is a compulsory step.
$3
Once the installation is done, you can open your project (WordPress plugin/theme) folder and run the start script.
`sh
npm startTo stop press CTRL (β) + C
`$3
To optimize images and generate WP POT translation file, or generate a RTL stylesheet you can run the following commands
`sh
To optimize images
gulp imagesTo generate WP POT translation file.
gulp translateTo generate RTL stylesheets and Sourcemap.
gulp stylesRTL
`
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.
>
`html
> '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, 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 WPCouple.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.
- π $99.99 β Support for one hour or more β
- π° $49.99 β Support half an hour maintenance β
- βοΈ $9.99 β Buy us lunch or coffee to keep us trucking #OpenSource β
$3
This open source project is maintained by the help of awesome businesses listed below. What? Read more about it β















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._Follow me π on Twitter for more updates and questions_ β 
> π Installs WPGulp for you. Downloads all the required files and installs node packages. [Node >= 8 and npm >= 5.3].
Read more about the documentation or anything related to WPGulp β