3 * Make the highlighted docs = needs more work....
5 * In the top level Roojs directory.. (you need to change the path of the jstoolkit)
8 * roolite buildSDK/make_src_highlighted.js -L../rooscript/examples/jstoolkit2
10 * put's the resulting files in docs/symbols/src
11 * (make sure it exists first..)
13 * Uses the dependancy order file.. (could do this recursively, it's pretty simple..)
15 * <script type="text/javascript">
18 include 'prettyPrint.js';
24 var spath = File.getcwd();
25 var flist = File.read(spath+"/buildSDK/dependancy_order.txt" ).split("\n");
26 for(var i = 0; i < flist.length;i++) {
28 if (/^\s*\//.test(f) || !/[a-z]+/i.test(f)) {
31 //println("ADD"+ f.replace(/\./g, '/'));
32 files.push(spath + '/' + f.replace(/\./g, '/').replace(/\s+/g,'')+'.js');
36 for(var i=0; i < files.length; i++) {
38 println("reading " +files[i] );
39 if (!File.exists(files[i])) {
40 throw "missing file: " + files[i];
44 var prettyfile = spath + '/docs/symbols/src/' +files[i].substr(spath.length+1).replace(/\//g, '.').replace(/\.js$/, '.html');
45 // should do timestamp stuff!
46 if (File.exists(prettyfile) &&
47 File.getTimes(prettyfile)[0] > File.getTimes(files[i])[0]
49 File.chmod(prettyfile, 0644);
53 var str = File.read(files[i]);
55 // probably want do do templating or something here..
56 // we probably want to do some sexy replacement on the comments using our parsed info on the file!? ;)
58 var pretty = toPretty(str);
63 println("write : " + prettyfile);
65 File.write(prettyfile,
67 '<title>' + files[i].substr(spath.length+1) + '</title>' +
68 '<link rel="stylesheet" type="text/css" href="../../../css/highlight-js.css"/>' +
69 '</head><body class="highlightpage">' +
73 File.chmod(prettyfile, 0644);