Gulp tasks with sample assets structure which can be use as a starting point for a WordPress theme. Configure as required and integrate in your own workflow.
- Generates .pot file from the text-domains used in Theme's PHP files using gulp-wp-pot
- Adds theme information to the style.css header
- Compiles SASS using gulp-sass
- Autoprefixes CSS properties using gulp-autoprefixer
- Minifies CSS using gulp-clean-css
- Generates sourcemap using gulp-sourcemaps
- Concatinates multiple files into one JS file using gulp-concat
- Minifies the JS file
- Lints JS code // Todo
- Compresses images using gulp-imagemin
Make sure you have Node and Gulp installed.
git clone https://github.com/Pradent/gulp-wordpress-starter MyTheme
cd MyTheme
npm install
- Configure your text-domain information in config.json file.
- Optionally, you could also change the paths from that same file.
gulp
gulp watch
- Create yourtask.js in tasks directory
- Add your task name to default.js