title: Stop Gulp Task if Conditions are met
body: <p>I am trying to make it so if a --theme flag isn't specified it stops the gulp task and wondering the best way to do it in a DRY way.</p>
  
  <p>I would like each individual task to stop if a --theme isn't specified and also have the default task stop if it isn't met.</p>
  
  <p>I have tried a few things with no luck so far.</p>
  
  <p>Thanks,</p>
  
  <pre><code>gulp.task('test', function() {
  
      if(typeof(args.theme) == 'undefined' || args.theme === true) {
          console.log(msg.noTheme);
          return; // end task
      }
  
      // run rest of task...
  
  });
  
  gulp.task('test-2', function() {
  
      if(typeof(args.theme) == 'undefined' || args.theme === true) {
          console.log(msg.noTheme);
          return; // end task
      }
  
      // run rest of task...
  
  });
  
  gulp.task('default', ['test-1', 'test-2']);
  </code></pre>