Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Javascript include order vs cat (Was: grep, sed, and cat - oh my!)



TLUG,

Whoops... slight problem.

When I cat the Javascript files together, the resulting mega-Javascript doesn't seem to work.

The errors I get from Firebug indicate that the order in which the code is written is messed up so that it's trying to use variables and functions before they're declared. The order in which I include the Javascript files in the HTML is not being preserved (... and, of course, now that I think about it, why would it?)

Damn. I hadn't thought of that problem.

I guess one way I could solve the problem is explicitly name each Javascript file and cat them one by one, in order.

Instead of writing out a cat command for each individual file to be included, though, is it possible to reference a text file where I can list the files in the order I want them to be cat-ed in?

This is one area where Google is failing because the search terms collapse on themselves - "cat command text file list", for example, results in things to do with combining two text files with lists in them, not files with lists that are used for the cat command itself.

Any advice would be much appreciated (even if it was recommendations for better search terms!).

--
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links