

Of course, you don’t have to call the file app.js. Specifically, the file contains instructions for the files and the order in which I want the files added to the output file. This file is where I define the files I want to include in. Notice in the image above, I have a file called app.js. If you’ve got something like this, then setting up your environment to create a single, minified file for the project is easy. Perhaps they are in a specified directory or perhaps they are in individual files with a suffix.

I’m also assuming you have a place where you’re saving your minified JavaScript files. These are the ones that you typically work with during development. There are some advantages to doing this (as well as alternative ways of doing this), but before I talk about those, I want to show how actually to do it.įirst, I assume that you have some directory structure set up so that you’ve got your un-minified, raw JavScript files. Things that other build tools tend to make a bit easier to achieve.įor example, when I’m working on a project for WordPress that will focus on a single area of the application, such as the administration area, then I prefer to take all of the various JavaScript files I’m writing and then concatenate them into a single, minified file.ĬodeKit makes this possible in two ways: Through the GUI and directives in an individual file.Ĭoncatenating JavaScript Files with CodeKit It’s not that I’m making a case for you to use it, but if you are using it, then there are some that it offers that aren’t immediately evident. I’ve been a fan of it for a long time, and it still fits well into my workflow. Of all the various build tools that are available right now (such as Gulp, Grunt, and others), I still find myself using CodeKit.
