sanu0074
Новичок
Почему он собирает файлы (в каком-то своем) случайном порядке, а не как перечислено в order()?
Код:
var gulp = require('gulp'),
concat = require('gulp-concat'),
order = require("gulp-order"),
uglify = require('gulp-uglify');
gulp.task('scripts', function () {
gulp.src('pack-js/*.js')
.pipe(order([
"pack-js/acc.common.js",
"pack-js/acc.userlocation.js",
"pack-js/acc.track.js",
"pack-js/acc.cms.js",
"pack-js/acc.product.js",
"pack-js/acc.refinements.js",
"pack-js/acc.storefinder.js",
"pack-js/acc.carousel.js",
"pack-js/acc.autocomplete.js",
"pack-js/acc.pstrength.js",
"pack-js/acc.password.js",
"pack-js/acc.minicart.js",
"pack-js/acc.pickupinstore.js",
"pack-js/acc.orderapproval.js",
"pack-js/acc.langcurrencyselector.js",
"pack-js/acc.paginationsort.js",
"pack-js/acc.checkout.js",
"pack-js/acc.address.js",
"pack-js/acc.refresh.js",
"pack-js/acc.stars.js",
"pack-js/acc.forgotpassword.js",
"pack-js/acc.productDetail.js",
"pack-js/acc.producttabs.js",
"pack-js/acc.variantdetails.js"
]))
.pipe(concat('build.common.js'))
.pipe(uglify())
.pipe(gulp.dest('js'));
});
gulp.task('default', function() {
gulp.run('scripts');
gulp.watch('pack-js/**', function(event) {
gulp.run('scripts');
})
});