Book Image

Responsive Design High Performance

By : Dewald C Els, Dewald Els
Book Image

Responsive Design High Performance

By: Dewald C Els, Dewald Els

Overview of this book

Table of Contents (16 chapters)
Responsive Design High Performance
About the Author
About the Reviewers
Speeding Up Development with Design Concepts, Patterns, and Programs

File concatenation

Combining JavaScript manually is effective, but it is quite a tedious task. So, here is a great way to make this a little easier.

As an example, if you have a JavaScript file called main.js, you can include other JavaScript file contents in the main file by using an include statement. Here is an example:

#include file="js/jquery.js"

If file concatenation has been enabled on the server, the contents of jquery.js will be inserted into the main.js file.

You can make use of a tool available from for this. There is also Grunt or Gulp that you can use to automate both file concatenation and CSS minifying. Both of these are task runners. They allow you to automate your web development. Both are very well-supported and have plenty of documentation as well.