From: alan Date: Wed, 28 Apr 2010 05:29:01 +0000 (+0800) Subject: JSDOC/Packer.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=c67e9a0cb57c7af8ec0c40415422ba7501f18726 JSDOC/Packer.js --- diff --git a/JSDOC/Packer.js b/JSDOC/Packer.js index 8694fb7..c60f089 100644 --- a/JSDOC/Packer.js +++ b/JSDOC/Packer.js @@ -127,7 +127,23 @@ Packer.prototype = { loadSourceFile : function() { - var lines = File.read(this.srcfile).split("\n");; + 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.. + continue; + } + if (/\.js$/.test(f)) { + _this.files.push( f); + // js file.. + continue; + } + + //println("ADD"+ f.replace(/\./g, '/')); + _this.files.push( f.replace(/\./g, '/').replace(/\s+/g,'')+'.js'); + + }) },