O'Reilly logo

Grunt Cookbook by Jurie-Jan Botha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Concatenating files

The practice of concatenating files is quite often found in the routines of all kinds of developers. Be it combining fragmented log files or many smaller source files into one big code base, joining files end-to-end comes in handy on a regular basis.

Concatenation functionality can be provided to us by the contrib-concat (0.4.0) plugin. Along with the standard Grunt configurations, it also provides a large set of options to tailor its behavior according to our unique requirements.

Getting ready

In this example, we'll work with the basic project structure we created in the Installing Grunt on a project recipe in Chapter 1, Getting Started with Grunt. Be sure to refer to it if you are not yet familiar with its contents.

How to do ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required