title: Bundling jquery and Bootstrap in Gulp
body: <p>I've set up the following gulp file</p>
  
  <pre><code>var gulp = require("gulp");
  var del = require("del");
  var concat = require("gulp-concat");
  var uglify = require("gulp-uglify");
  var sourcemaps = require("gulp-sourcemaps");
  var rename = require("gulp-rename");
  
  var paths = {
      wwwroot: {
          lib: "./wwwroot/lib"
      },
      lib: [
          "./node_modules/jquery/dist/jquery.js",
          "./node_modules/bootstrap/dist/js/bootstrap.js"
      ]
  }
  
  gulp.task("clean",
      function() {
          return del([paths.wwwroot.lib]);
      });
  
  gulp.task("copy-lib", ["clean"],
      function () {
          return gulp.src(paths.lib)
              .pipe(gulp.dest(paths.wwwroot.lib));
      });
  
  gulp.task("uglify", ["copy-lib"],
      function () {
          return gulp.src(paths.wwwroot.lib + "/**/*.js")
              .pipe(sourcemaps.init())
              .pipe(concat("bundle.js"))
              .pipe(uglify())
              .pipe(isDebug, sourcemaps.write())
              .pipe(rename(addMinExtension))
              .pipe(gulp.dest(paths.wwwroot.lib));
      });
  
  gulp.task("default", ["clean", "uglify"],
      function () {
          del([paths.wwwroot.lib + "/**.*", "!" + paths.wwwroot.lib + "/*.min.js"]);
      });
  </code></pre>
  
  <p>This bundles and uglifies bootstrap in to a single js file. However, when I attempt to use this file in the browser I get the following error</p>
  
  <pre><code>bundle.min.js:1 Uncaught Error: Bootstrap's JavaScript requires jQuery
      at bundle.min.js:1
  </code></pre>
  
  <p>How can I ensure that bootstrap knows that I've bundled (<code>gulp-concat</code>) jquery so that it knows it's access to it. Am I missing a step in my bundling?</p>