A Gulp Starter for your WordPress project
UpGulp is our gulp module. It contains all of the configuration, setup, and tasks for processing themes, plugins, and whatever else.
It's modular. Shocking, I know. But navigating one big-butt gulpfile.js
is a pain in the backside.
Instead, we split our gulp tasks out in the assets/gulp/tasks
folder. The main file gulpfile.js
then loads up all of the configuration (which is stored in config/gulp/config.js
), plugins, and requirements. Then it calls each of the tasks. Think of it as your Controller or better yet, Task Manager.
It includes:
assets/js/*.js
.min
suffixassets/dist/
.min
suffix.css
and .min.css
files to the root of the theme folder.This gulp starter has Bourbon, Neat, and Sass REM baked into it. To use these in your style.scss
file and project, do the following:
@import 'bourbon';
@import 'neat';
@import '../../node_modules/sass-rem/rem';
REM is being deprecated out of Bourbon. Using the sass-rem
module lets us import the functionality we want. To convert pixels into rems, add the following into your Sass declaration:
@include rem( font-size, 18px );
You can learn more about the syntax in the documentation;
git clone https://github.com/KnowTheCode/UpGulp.git
. The repository is loaded into a new subfolder called UpGulp.UpGulp
folder into the root of your plugin or theme.
gulpfile.js
, package.json
, config/gulp
, and assets/gulp
npm install
. It will automatically install all of the modules specified in the package.json
file.moduleSettings
as found in config/gulp/config.js
. You will want to change:
moduleSettings.package
-> change to the package's namemoduleSettings.domain
-> change to the domain namemoduleSettings.isTheme
-> If this is a theme, then set it to true
.moduleSettings.i18n
-> Define the i18n parametersTo run it, open terminal and type gulp watch
. There are various watchers available including:
gulp scripts
gulp styles
gulp sprites
gulp i18n
gulp icons
gulp imagemin
This gulp setup is inspired by WebDev Studio's setup.
All feedback, bug reports, and pull requests are welcome.
There are things we need to improve and test in this starter module including: