gulp.task('bower', function() {
gulp.src(mainBowerFiles({
"overrides": {
"jquery": {
"main": "./dist/jquery.min.js"
},
"bootstrap-grid": {
"main": [
'./dist/bootstrap-grid.min.css'
]
}
}
}))
.pipe(gulp.dest('./lib/'))
});
gulp.task('bower', function() {
var mainBowerFilesArr = mainBowerFiles({
'overrides': {
'jquery': {
'main': './dist/jquery.min.js'
},
'bootstrap-grid': {
'main': './dist/bootstrap-grid.min.css'
}
}
}).map( function(path) {
return path;
});
for (var i = mainBowerFilesArr.length - 1; i >= 0; i--) {
var p = mainBowerFilesArr[i].substring(mainBowerFilesArr[i].indexOf('bower_components'));
var f = p.split('\\')[1]+'/';
gulp.src(p).pipe(gulp.dest(path.build.lib+f));
}
});
// Concat vendor JS (uglify for production)
gulp.task('js:vendor', function() {
gulp.src(mainBowerFiles({
"overrides": {
"jquery": {
"main": "./dist/jquery.min.js"
},
"magnific-popup": {
"main": "./dist/jquery.magnific-popup.min.js"
},
"slick-carousel": {
"main": "./slick/slick.min.js"
},
"jquery.maskedinput": {
"main": "./dist/jquery.maskedinput.min.js"
},
"jqueryrotate": {
"main": "./jQueryRotate.js"
}
}
}))
.pipe(jsFilter)
.pipe(concat('vendor.js'))
.pipe(gulpIf(env !== 'dev', uglify()))
.pipe(gulp.dest(outputDir + 'js'))
});
gulp.task('js', function() {
gulp.src(src.js)
.pipe(jsHint())
.pipe(jsHint.reporter('default'))
.pipe(concat('script.js'))
.pipe(gulpIf(env !== 'dev', uglify()))
.pipe(gulp.dest(outputDir + 'js'))
.pipe(connect.reload());
});