This program search under the preset folder (JSFILEFOLDER) for requested files and send them in order.
This program accepts 3 arguments: l(link list), duplicate and compress.
Allow duplication or not (i.e. when the request is “A,B,A”, if duplication is not allowed, the last duplicated A will be ignored). Acceptable values are true | yes | false | no, default is no.
disable header. Acceptable values are true | yes | false | no, default is no.
Level of compression. Add 1 to remove comment blocks; add 2 to remove comment lines; add 4 to remove indents; add 8 to remove line breakers. i.e. if need to remove all comments, use value 3 (Add 1 and 2). Default value is 0 (no compression).
jquery-latest.js and yui-latest.js are requested, allowing duplication, at compression level of 15 and disable header
- Now supports file inclusion, which implements “file dependency” functionality.
Add single-line inclusion commands to include necessary files. Its syntax is:
//#include <filename> //#include_once <filename>
When using “#include_once”, the file will only be included when that file has not yet been included before.
If loading file A, B and C, while A and B both need to include D, when processing the “#include_once” command in file B, D will not be included again.
The inclusion command is find recuisively; if the file being included needs to include other files, those file will be loaded first.
If any file that is need by one file fails to be loaded, either not existing or unreadable, the whole file is considered failing to be loaded.
- Change the header to console commands.
- Added a switch to disable header.
- It is not recommended using pending in-line comments. In-line comments should take their own lines. Otherwise do not use compression.