This is a Gulp 4 / SASS config file designed to work with Wordpress theme. Generate compiled, minimized CSS and JS files. FTP deploy to development server.
- Install dependencies:
npm install
-
Set up FTP credentials to your Wordpress theme within gulpfile.js.
-
Set up Wordpress theme's required meta-data in /sass/style.scss file
- Concatenate all files into one
- Watch on changes in /sass/ and /js/, auto compile and FTP deploy
- Watch on changes of all .php theme files and auto FTP deploy
- Send changed files through FTP to development version of your site (don't use on production!)
- CSS compiler uses autoprefixer so you don't have to worry about vendor prefixes
To compile files use command:
gulp build
To enable compiling files and auto deploy use command:
gulp watch
If you need to send all files through FTP use command:
gulp depall
To send only changed files use command:
gulp deploy
Any customizations should be made through *.scss files within the /sass/ folder and *.js files in /js/ folder.