Custom gulp task, npm and bower packages for Wordpress automation.
- Generate wp starter theme (sassified version) from UNDERSCORES.
- Extract and copy the files to your working directory
wp-content -> themes
or upload the theme directly via wordpress dashboard. - Download the latest release.
- Extract and copy files to your generated theme.
- Open
Gulpfile.js
and replace the necessary values inside the single quote:
var URL = 'http://yoursite.com';
var dist_themename = 'NAME-OF-THEME-FOLDER';
var ftpUploadDir = '/public_html/path-to-upload-theme-folder/'+dist_themename;
var ftpCredentials = {
ftphost: 'HOST',
ftpuser: 'USER',
ftppassword: 'PASSWORD'
};
/* --End-- */
- Run npm and bower to install packages.
$ npm install && bower install
You are now ready to kick-off your custom theme development!
Default task
Compile SCSS files in sass
folder, minify styles and scripts. Compiled files are saved in assets
folder.
Run:
$ gulp
Serve task
Preview the project on local web server, watch files for changes, reloading the browser automatically via BrowserSync
Run:
$ gulp serve
Build task
Build a distributable theme files in the dist
folder. Will have compressed and uncompressed version.
Run:
$ gulp build
Upload Production-ready files
Upload the build custom theme to the FTP Server.
Run:
$ gulp deploy
Delete uploaded files in the server
Run:
$ gulp deploy-clean
MIT © Glenny Abellana