Gulp is new here, I uploaded gulp-order to order js files for instantiation *. js because some of my javascript files require jquery to load.
Below are my gulpfile.js which have order, concat, rename and uglify.
var date = new Date(); var uniq = date.getTime(); gulp.task('admin-scripts', function() { return gulp.src(['assets/admin/js/*.js','!assets/admin/js/respond.min.js','!assets/admin/js/html5shiv.js']) .pipe(order([ "assets/admin/js/jquery.min.js", 'assets/admin/js/*.js' ])) .pipe(concat(uniq+'admin.js')) .pipe(gulp.dest('build/assets/admin/js/')) .pipe(rename(uniq+'admin.min.js')) .pipe(uglify()) .pipe(gulp.dest('build/assets/admin/js/')); });
But the order does not seem to work.
the order is based on the alphabet a.js> z.js instead of jquery.min.js> a.js> z.js
Is there anything that I would write incorrectly on gulpfile.js?
source share