klei/gulp-inject

Erroring on deprecated 'sort' function without sort option being called.

andy-blum opened this issue · 0 comments

I'm really new to using node, so please forgive me if there's a pretty basic error.

when I run my scripts task (below) I get the following error:

Error in plugin "gulp-inject"
Message: Sort option is deprecated! Use `sort-stream` module instead!

I'm not attempting to use the sort option at all. Why is this error appearing?

var paths = {
  source: {
    jswrapper: 'src/js/wrapper.js',
    functions: 'src/js/functions/*.js',
    scripts: 'src/js/*.js'
  },
  dist: {
    scripts: 'dist/js'
  }
};


gulp.task('scripts', function () {
  var target = gulp.src(paths.source.jswrapper);
  var sources = gulp.src([paths.source.functions, paths.source.scripts]);
  var options = [
    {starttag: '/* inject:js */'},
    {endtag: '/* endinject */'}
  ]
  return scripts = target.pipe(inject(sources, options))
    .pipe(uglify().on('error', onError))
    .pipe(gulp.dest(paths.dist.scripts));
});