title: Gulp bundle only if source files changed
body: <p>I'm pretty new to gulp, so hopefully this is an easy one.</p>
  
  <p>I'm trying to genereate a number of bundles, each of which will be composed of a bunch of js/css files (sourced from a file), but I only want to build each bundle if any of it's source files changed.</p>
  
  <p>My starting code looks like the following. What do I need to add to make it work?</p>
  
  <pre><code>gulp.task('bundle', function () {
      return gulp
          .src(sourceFile)
          .pipe(bundle())
          .pipe(gulp.dest(buildDest))
          .pipe(bundle.results({
              pathPrefix: '/bundlePath/',
              dest: manifestDest
          }));
  });
  </code></pre>
  
  <p>sourceFile:</p>
  
  <pre><code>module.exports = {
      bundle: {
          "bundle1": {
              "scripts": [
                  "file1.js",
                  "file2.js",
                  "file3.js"
              ],
              "styles": "style1.css"      
          },
          "bundle2": {
              "scripts": [
                  "file1.js",
                  "file4.js"
              ],
              "styles": [         
                  "style1.css",
                  "style2.css"
              ]
          }
      }
  }
  </code></pre>
  
  <p>For example, if only file1.js changes, I want both bundle1 and bundle2 rebuilt since they share file1.js. If only file4.js changes, only bundle2 should be rebuilt.</p>
  
  <p>This process is kicked off when the release version of the project is built in VS2012.</p>
  
  <p>I looked into alternative packages like gulp-changed, but they seem to only work with single files (correct me if I'm wrong).</p>