For functions and more complicated modules, I create a text file that includes the script tag and src attribute, and bundle it with the module itself. Then, to use the functions, all that is necessary is to cut and paste the text from the 'header' file, and place the module itself in the appropriate directory. For example, the text file included with the cookie functions looks something like:
|
The header file should include enough information for you to know how to use it, and what arguments need to be sent to the function. In the example above, I've included a lot of information because I plan on distributing the code. If I were going to be using the module strictly for my own purposes I might not comment it so thoroughly. And, if you want to get fancy, you could always create the header files in HTML, and make a master document that links to the individual header files.