Changeset 12269

Show
Ignore:
Timestamp:
02/03/08 17:12:29 (11 months ago)
Author:
jburke
Message:

Fixes #5182. Run processConditionals before dependency mapping. Allows ability to exclude dojo.require statements. \!strict

Location:
util/trunk/buildscripts
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • util/trunk/buildscripts/build.js

    r12119 r12269  
    106106 
    107107        logger.trace("Building dojo.js and layer files"); 
    108         var result = buildUtil.makeDojoJs(buildUtil.loadDependencyList(kwArgs.profileProperties), kwArgs.version, kwArgs); 
     108        var result = buildUtil.makeDojoJs(buildUtil.loadDependencyList(kwArgs.profileProperties, kwArgs), kwArgs.version, kwArgs); 
    109109 
    110110        //Save the build layers. The first layer is dojo.js. 
  • util/trunk/buildscripts/jslib/buildUtil.js

    r12248 r12269  
    215215} 
    216216 
    217 buildUtil.getDependencyList = function(/*Object*/dependencies, /*String or Array*/hostenvType, /*String?*/buildscriptsPath){ 
     217buildUtil.getDependencyList = function(/*Object*/dependencies, /*String or Array*/hostenvType, /*Object?*/kwArgs, /*String?*/buildscriptsPath){ 
    218218        //summary: Main function that traces the files that are needed for a give list of dependencies. 
    219219 
     
    335335                        load = function(uri){ 
    336336                                try{ 
    337                                         var text = buildUtil.removeComments(fileUtil.readFile(uri)); 
     337                                        //Strip comments and pply conditional directives before tracing the dependencies. 
     338                                        var text = fileUtil.readFile(uri); 
     339                                        var text = (kwArgs ? buildUtil.processConditionals(layerName, text, kwArgs) : text); 
     340                                        var text = buildUtil.removeComments(text); 
     341 
    338342                                        var requires = dojo._getRequiresAndProvides(text); 
    339343                                        eval(requires.join(";")); 
     
    612616} 
    613617 
    614 buildUtil.loadDependencyList = function(/*Object*/profile, /*String?*/buildscriptsPath){ 
     618buildUtil.loadDependencyList = function(/*Object*/profile, /*Object?*/kwArgs, /*String?*/buildscriptsPath){ 
    615619        //summary: Traverses the dependencies in the profile object. 
    616620        //profile: 
    617621        //              The profile object that is a result of a buildUtil.evalProfile() call. 
    618         var depResult = buildUtil.getDependencyList(profile.dependencies, profile.hostenvType, buildscriptsPath); 
     622        var depResult = buildUtil.getDependencyList(profile.dependencies, profile.hostenvType, kwArgs, buildscriptsPath); 
    619623        depResult.dependencies = profile.dependencies; 
    620624         
  • util/trunk/buildscripts/webbuild/helma/apps/builder/Root/main.hac

    r10641 r12269  
    7373 
    7474//Build the layer contents. 
    75 var depResult = buildUtil.makeDojoJs(buildUtil.loadDependencyList(kwArgs.profileProperties, buildscriptDir), kwArgs.version, kwArgs); 
     75var depResult = buildUtil.makeDojoJs(buildUtil.loadDependencyList(kwArgs.profileProperties, null, buildscriptDir), kwArgs.version, kwArgs); 
    7676 
    7777//Grab the content from the "dojo.xd.js" layer.