I have the following build profile for a small application:
var profile = (function(){ var copyOnly = function(filename, mid){ /* ..snip.. */ }; return { basePath: "../../src", releaseDir: "../dist", releaseName: "lib", action: "release", packages: [ 'dojo', 'dijit', //'dojox', 'amd', { name: 'lodash', location: 'lodash', trees: [ [".", ".", /(\/\.)|(~$)|(vendor|test)/] ] }, { name: 'd3', location: 'd3', main: 'd3.min', trees: [ [".", ".", /(\/\.)|(~$)|(src|lib|test)/] ] }, { name: 'app', location: 'app' } ], layers: { "dojo/dojo": { include: [ "dojo/dojo", "amd/d3","amd/gmaps", "app/main", "app/run" ], customBase: true, boot: true } }, resourceTags: { /* ..snip.. */ } }; })();
The problem is this: all I need is the lodash.min.js file, which will be processed by the Dojo build system. Unfortunately, when you include the package definition in your profile, the build system scans all the files in the corresponding directory using the implicit value of trees . You can rewrite it (as I did here) and add some ignore directives, but it is ugly and leaves you open so that something is missing. What I would like to do is to affirmatively indicate which file (s) I am interested in processing for my build process.
Does Dojo let you do this? The documentation is a bit sparse in this area, but if you can help me find a resource that will explain this more clearly, it will be great!