X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FPacker.js;h=d04e630e9061afb5682f12eace8e6e37e9c44503;hb=2a10119befba6ac7ea16a3df614a64078890158d;hp=3b6113c58f560957643f0f938f9a1790ef8de8ec;hpb=c255529d82a8826ac603b252b5ef99a3715edf14;p=gnome.introspection-doc-generator diff --git a/JSDOC/Packer.js b/JSDOC/Packer.js index 3b6113c..d04e630 100644 --- a/JSDOC/Packer.js +++ b/JSDOC/Packer.js @@ -127,7 +127,27 @@ Packer.prototype = { loadSourceFile : function() { - + var lines = File.read(this.srcfile).split("\n"); + var _this = this; + lines.forEach(function(f) { + + if (/^\s*\//.test(f) || !/[a-z]+/i.test(f)) { // skip comments.. + return; + } + if (/\.js$/.test(f)) { + _this.files.push( f); + // js file.. + return; + } + + //println("ADD"+ f.replace(/\./g, '/')); + var add = f.replace(/\./g, '/').replace(/\s+/g,'')+'.js'; + if (_this.files.indexOf(f) > -1) { + return; + } + _this.files.push( add ); + + }) },