title: How to exclude files from Dojo's Build System?
body: <p>I'm following the <a href="http://dojotoolkit.org/reference-guide/1.9/build/buildSystem.html#trees-dirs-and-files" rel="nofollow">official documentation page about the topic</a> but I cannot configure it to ignore <code>.txt</code> files.</p>
  
  <p>I have a <code>all.profile.js</code> on the root of my project:</p>
  
  <pre><code>var profile = (function(){
      return {
          basePath: "./",
          releaseDir: "../web",
          action: "release",
          layerOptimize: "closure",
          optimize: "closure",
          cssOptimize: "comments",
          mini: true,
          stripConsole: "all",
  
          packages: [
              { name: "myapp", location: "myapp" }
          ]
      };
  })();
  </code></pre>
  
  <p>And this is the <code>package.json</code> inside the folder <code>myapp</code>:</p>
  
  <pre><code>{
      "dojoBuild": "myapp.profile.js",
      "name": "my-app",
      "description": "This is My App",
      "version": "1.0",
      "main": "src"
  }
  </code></pre>
  
  <p>And this is the <code>myapp.profile.js</code> also inside the folder <code>myapp</code>:</p>
  
  <pre><code>var profile = (function(){
      return {
          // don't need to do anything on the 'test' folder so don't define it on the trees.
          trees: [
              ["libs","libs",/txt$/], // ignore .txt files -&gt; DOESN'T WORK!
              ["src","src",/txt$/]    // ignore .txt files -&gt; DOESN'T WORK!
          ],
          resourceTags: {
              test: function(filename, mid){
                  console.log("[test] filename: ",filename);
                  return filename.indexOf("test/") !== -1;
              },
              copyOnly: function(filename, mid){
                  //console.log("[copyOnly] mid: ",mid);
                  return false;
              },
              miniExclude: function (filename, mid) {
                  console.log("[miniExclude] filename: ",filename);
                  return mid in {
                      'myapp/myapp.profile': 1,
                      'myapp/package.json': 2
                  } || mid.indexOf(".txt") !== -1; // .txt are not ignored so exclude them...
              },
              amd: function(filename, mid) {
                  //console.log("[amd] mid: ",mid);
                  // myapp is not AMD but this will 'convert' it
                  return false;
              }
          }
      };
  })();
  </code></pre>
  
  <p>Finally, this is the folder structure:</p>
  
  <pre><code>web_dev/
  -- myapp/
  ---- libs/
  ---- src/
  ---- test/
  ---- myapp.profile.js
  ---- package.json
  -- all.profile.js
  </code></pre>
  
  <p>The build tool runs fine, it reads and process all files but the <code>.txt</code> files are still on the release dir.</p>
  
  <p>Please let me know if you spot any mistakes on my logic or how I'm configuring the build system. I'm using Dojo 1.9.1.</p>
  
  <p>Thanks in advance.</p>