soliseries.blogg.se

Using codekit with wordpress
Using codekit with wordpress












  1. #USING CODEKIT WITH WORDPRESS INSTALL#
  2. #USING CODEKIT WITH WORDPRESS SERIES#

This format will get familiar as it’s how you save all your packages for development purposes. Once this is complete the first package we’ll want to save into our devDependencies is gulp itself.

#USING CODEKIT WITH WORDPRESS SERIES#

This will take you through a series of prompts for giving your project a name, description, and more. The file is created by running the following command: This is where the packages your project depends on are stored. Once inside the desired directory in your terminal you’ll need to create a package.json file. Depending on where your files are located on your system that could be something like:Ĭd ~/sites/my-site/wp-content/themes/my-theme Using a WordPress theme as an example (though this workflow works just as well for plugins) you would want to navigate into your theme directory folder. Next, you’ll either need to navigate to a directory of an existing project or create a new directory.

#USING CODEKIT WITH WORDPRESS INSTALL#

Open up your terminal and run npm install -global gulp-cli.

using codekit with wordpress

Getting setup with Gulpįirst, you’ll need to install the gulp command line utility. nvm allows you to switch between versions of Node.js on your system which is very useful if you end up working on a legacy project with packages that haven’t been updated to work with the latest version of Node.js. If you’re getting Node.js installed now may be a good time to take a look at installing Node Version Manager ( nvm) as well. If you don’t have them installed go ahead and install Node.js and it should take care of it all. node -versionĮach of these commands should return something along the lines of 10.15.1 depending on the version you have. Pop open your terminal and run the following commands. If you’re not sure you have those installed it is easy enough to check. Installing Node.jsīefore getting Gulp installed you’ll need Node.js, npm, and npx installed. But you can do anything you’d like with vanilla JavaScript and Node modules inside your gulpfile which we’ll touch on in a bit.įirst we need to get Gulp installed. In addition to actions like compiling SASS, you can compile modern JavaScript into browser-compatible JavaScript with Babel, minify and concatenate files, run tests, refresh your browser when files are changed, and much more.Ī lot of these actions are performed by the large library of plugins available for Gulp.

using codekit with wordpress

Gulp is a JavaScript based task-runner built on Node.js for automating development workflows. This is article is going to focus on using Gulp to handle the task-running and compiling of your development workflow. You have CodeKit for a more user focused interface, Webpack is the new hotness taking over the world, and Grunt is the old standard. If you’re looking to get started using SASS and modern JavaScript in your WordPress projects, be it theme or plugin, you’re going to need to something to handle the compiling.














Using codekit with wordpress