Changeset 7308

Show
Ignore:
Timestamp:
02/13/07 20:31:50 (22 months ago)
Author:
jburke
Message:

References #2366. Allow turning of Dojo copyright insertion, to make web builds smaller (copyright still inserted at top of web built file, and non-dojo copyrights are still preserved).

Location:
branches/0.4/buildscripts
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/0.4/buildscripts/buildUtil.js

    r7302 r7308  
    852852} 
    853853 
    854 buildUtil.stripComments = function(/*String*/startDir){ 
     854buildUtil.stripComments = function(/*String*/startDir, /*boolean*/suppressDojoCopyright){ 
    855855        //summary: strips the JS comments from all the files in "startDir", and all subdirectories. 
    856         var copyright = new String(readFile("copyright.txt")); 
     856        var copyright = suppressDojoCopyright ? "" : new String(readFile("copyright.txt")) + buildUtil.getLineSeparator(); 
    857857        var fileList = buildUtil.getFilteredFileList(startDir, /\.js$/, true); 
    858858        if(fileList){ 
     
    885885                                                copyrightText += singleLineMatches.join("\r\n"); 
    886886                                        } 
     887                                        copyrightText += buildUtil.getLineSeparator(); 
    887888                                }else{ 
    888889                                        copyrightText = copyright; 
     
    908909                                 
    909910                                //Write out the file with appropriate copyright. 
    910                                 buildUtil.saveUtf8File(fileList[i], copyrightText + buildUtil.getLineSeparator() + fileContents); 
    911                         } 
    912                 } 
    913         } 
    914 } 
    915  
     911                                buildUtil.saveUtf8File(fileList[i], copyrightText + fileContents); 
     912                        } 
     913                } 
     914        } 
     915} 
     916 
  • branches/0.4/buildscripts/stripComments.js

    r7280 r7308  
    11load("buildUtil.js"); 
    2 buildUtil.stripComments(arguments[0]); 
     2buildUtil.stripComments(arguments[0], arguments[1]); 
  • branches/0.4/buildscripts/webbuild/webbuild.sh

    r7303 r7308  
    4343#Got to buildscripts dir and run stripComments for web build. 
    4444cd .. 
    45 java -jar lib/custom_rhino.jar stripComments.js ../src 
     45java -jar lib/custom_rhino.jar stripComments.js ../src true 
    4646 
    4747#Now in release folder. Bundle it all up.