Skip to content
Frank Corso edited this page Aug 17, 2020 · 3 revisions

As with most software projects, we have a variety of build scripts that powers parts of our plugin. For this repo, we use Gulp.

If you have never used gulp before, you will need to follow the Gulp Quick Start guide.

Gulp Files

Our gulp files are divided into different categories of tasks and can be found in our tasks directory.

Gulp Tasks

Package & Release Tasks

gulp prebuild - Compiles and prepares all files. Runs clean_all followed by js, css, cssrtl, and langpack.

gulp build - Runs prebuild and then copies only deploy-ready files to a /build directory.

gulp package - Generates a release zip from the /build directory and places it into the /releases directory.

gulp release - Runs build and package tasks.

gulp clean_build - Deletes /build files and directory.

gulp clean_package - Deletes release zips.

CSS Tasks

gulp css - Compiles our main SASS files into CSS, including minified versions.

gulp cssrtl - Compiles our main SASS files into RTL CSS, including minified versions.

gulp clean_css - Deletes built CSS files.

JS Tasks

gulp js_admin - Compiles our main JS source files for the admin areas of the plugin into deploy-ready, concatenated JS, including minified versions.

gulp js_site - Compiles our main JS source files for the frontend areas of the plugin into deploy-ready, concatenated JS, including minified versions.

gulp js - Runs both js_admin and js_site tasks as well as both tasks in the WebPack section.

gulp clean_js_site - Deletes built site JS files.

gulp clean_js_admin - Deletes built admin JS files.

gulp clean_js - Runs both clean_js_site and clean_js_admin.

WebPack Tasks

gulp webpack - Runs our newer asset processes. Currently includes the form integration JS files.

gulp webpack:blockEditor - Compiles and prepares all files related to the block editor.

Language Files

gulp langpack - Generates language files.

gulp clean_langpack - Deletes language files.

Other Tasks

gulp clean_all - Runs all clean tasks including clean_js and clean_css.