toolman Posted January 3, 2014 Share Posted January 3, 2014 Hi,I have about 20 javascript files in my header which I know is way too many. Is there a way to easily combine them all into one? Could I just create a new javascript file and then copy and paste the contents of each file into the new one in the order they are loading on the page?Thanks! Link to comment https://forums.phpfreaks.com/topic/285058-how-to-combine-lots-of-javascript-files-into-one/ Share on other sites More sharing options...
trq Posted January 3, 2014 Share Posted January 3, 2014 cat file1 file2 file3 file4 > newfile Link to comment https://forums.phpfreaks.com/topic/285058-how-to-combine-lots-of-javascript-files-into-one/#findComment-1463691 Share on other sites More sharing options...
toolman Posted January 3, 2014 Author Share Posted January 3, 2014 Thanks for the reply. Is that a command line?/how would I use that? Link to comment https://forums.phpfreaks.com/topic/285058-how-to-combine-lots-of-javascript-files-into-one/#findComment-1463693 Share on other sites More sharing options...
kicken Posted January 3, 2014 Share Posted January 3, 2014 It is a linux command, you'd run it from the shell prompt. It just joins the files together the same as if you copy/pasted them all together into a single file so if you'd rather just do that you can. If everything works as is right now, combining them should not cause any issues. Link to comment https://forums.phpfreaks.com/topic/285058-how-to-combine-lots-of-javascript-files-into-one/#findComment-1463695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.