

- CODEKIT VS GULP INSTALL
- CODEKIT VS GULP CODE
- CODEKIT VS GULP PLUS
- CODEKIT VS GULP SERIES
- CODEKIT VS GULP DOWNLOAD
CODEKIT VS GULP INSTALL
I develop all of my themes on a single local WordPress install and then switch between themes as I go – so for me it makes sense to have a command line parameter so that I can specify which theme I want to test. I assume the reason other people don’t use this method is because they develop each theme as a separate project, so they would have different gulpfiles for each theme. I am using a command line argument, which isn’t that common in the world of Gulp. However this would create an error – because I’m doing something a bit different. To execute the task against the twentyfifteen theme you would run the following on the command line: gulp checktextdomain -theme twentyfifteen This is a generic command that will work with any programming language so we have to tell it all of the WordPress translation functions.

Note that JQuery won’t work – although there are some jquery style Gulp plugins, but that’s getting ahead of ourselves 🙂 So if you want to do something custom, it’s likely you can use some simple javascript to do it.
CODEKIT VS GULP CODE
All the code we’re going to write is javascript.

Note also that it’s a js (javascript) file. To run tasks I need to create a gulpfile.js – since I run the same tasks on multiple themes I put this in the themes directory. You can read more about textdomains and localization in WordPress on the WordPress theme developer site. So it’s good to have a reminder if I forget to change a textdomain. I setup the checker because I (currently) have 20 themes to manage, and when updating them I often copy and paste code between files – textdomains and all. They tell the WordPress localization code which language file to use for the current translation string. TextDomains are identifiers used in translations. One of the simplest tasks I have in my automation setup is checking theme textdomains are correct. The thing is, you have gulp setup, but it doesn’t currently do anything. You should then add gulp as a project dependency with: npm install -save-dev gulp You will need to do this any time you create a new project. Just follow read the text and answer the questions. This will create a package.json file in your project root and set the basic properties. For WordPress development I use the themes directory. It’s a single command to install Gulp using npm. Open the command line (I like iTerm2 version 3 for the Mac). This is what we will use to install Gulp, and its plugins… on the command line.

This installs Node, and something called NPM (Node Package Manager).
CODEKIT VS GULP DOWNLOAD
Just download the install file from NodeJS, and run it. Gulp uses NodeJS to run, but don’t worry – this is the easiest step. Chrises article outlines things nicely – however there are a few differences between Gulp and Grunt. I actually followed the tutorial written by Chris Coyier for setting up Grunt, called Grunt is not weird or hard. So what do I use it for? I use it to compile theme zips, generate rtl.css files, check theme text domains, compress images, and much more. A common example is it can watch SASS files for changes, and then compile the SASS into CSS automatically (despite it being a very common use case I use Codekit for this and not Gulp :)). It can also watch files and run processes on them when they change. It performs simple tasks on files you are working with.
CODEKIT VS GULP PLUS
Plus the benefits of running it outweighed the negatives of maintaining more code. But eventually I got it running and found that it wasn’t as hard as I had imagined. Plus it used the command line something I, as a designer, try to avoid. I found it complex to setup, and it seemed like it would just be more code to maintain. I resisted using Gulp (or Grunt etc) for a long time.
CODEKIT VS GULP SERIES
NovemBen Setting up Gulp for WordPress – and Checking TextDomains Automaticallyįor the first part in my ‘ Automating WordPress Development‘ series I felt I should start with setting up Gulp.
