text: import gulp from 'gulp';
  
  // Concatenate and minify JavaScript. Optionally transpiles ES2015 code to ES5.
  // to enable ES2015 support remove the line `"only": "gulpfile.babel.js",` in the
  // `.babelrc` file.
  gulp.task('scripts', () =>
      gulp.src([
        // Note: Since we are not using useref in the scripts build pipeline,
        //       you need to explicitly list your scripts here in the right order
        //       to be correctly concatenated
        './app/scripts/main.js',
        './app/scripts/perfmatters.js'
        // Other scripts
      ])
        .pipe($.newer('.tmp/scripts'))
        .pipe($.sourcemaps.init())
        .pipe($.babel())
        .pipe($.sourcemaps.write())
        .pipe(gulp.dest('.tmp/scripts'))
        .pipe($.concat('main.min.js'))
        .pipe($.uglify({preserveComments: 'some'}))
        // Output files
        .pipe($.size({title: 'scripts'}))
        .pipe($.sourcemaps.write('.'))
        .pipe(gulp.dest('dist/scripts'))
        .pipe(gulp.dest('.tmp/scripts'))
  );
  