diff --git a/bower.json b/bower.json index a5a5b73..3c6c50c 100644 --- a/bower.json +++ b/bower.json @@ -31,7 +31,11 @@ "./js/popover.js", "./js/scrollspy.js", "./js/tab.js", - "./js/affix.js" + "./js/affix.js", + "./fonts/glyphicons-halflings-regular.eot", + "./fonts/glyphicons-halflings-regular.svg", + "./fonts/glyphicons-halflings-regular.ttf", + "./fonts/glyphicons-halflings-regular.woff" ] } } diff --git a/gulpfile.js b/gulpfile.js index 2bd031d..6592574 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,13 +1,7 @@ /*global $:true*/ var gulp = require('gulp'); + var $ = require('gulp-load-plugins')(); -var plugins = require('gulp-load-plugins')(); - -var pngcrush = require('imagemin-pngcrush'); - -var mainBowerFiles = require('main-bower-files'); - -var pkg = require('./package.json'); var paths = { scripts: [ @@ -67,27 +61,30 @@ gulp.task('jshint', function() { }); gulp.task('js:dev', ['jshint'], function() { - return gulp.src(mainBowerFiles().concat(paths.scripts)) + return gulp.src(require('main-bower-files')().concat(paths.scripts)) + .pipe($.filter('**/*.js')) .pipe($.concat('./scripts.js')) .pipe(gulp.dest('assets/dist/js')) .pipe($.livereload({ auto: false })); }); gulp.task('js:build', ['jshint'], function() { - return gulp.src(mainBowerFiles().concat(paths.scripts)) + return gulp.src(require('main-bower-files')().concat(paths.scripts)) + .pipe($.filter('**/*.js')) .pipe($.concat('./scripts.min.js')) .pipe($.uglify()) .pipe(gulp.dest('assets/dist/js')); }); gulp.task('copy:fonts', function() { - return gulp.src(['bower_components/bootstrap/fonts/*', 'assets/src/fonts/*']) + return gulp.src(require('main-bower-files')().concat('asset/src/fonts/**/*')) + .pipe($.filter('**/*.{eot,svg,ttf,woff}')) .pipe(gulp.dest('assets/dist/fonts')); }); gulp.task('copy:jquery', function() { return gulp.src(['bower_components/jquery/dist/jquery.min.js']) - .pipe($.rename('jquery-' + pkg.devDependencies.jquery + '.min.js')) + .pipe($.rename('jquery-1.11.1.min.js')) .pipe(gulp.dest('assets/dist/js')); }); @@ -102,8 +99,7 @@ gulp.task('images', function() { return gulp.src('assets/src/img/**/*') .pipe($.imagemin({ progressive: true, - interlaced: true, - use: [pngcrush()] + interlaced: true })) .pipe(gulp.dest('assets/dist/img')); }); diff --git a/package.json b/package.json index 2cecc3e..d4f9e78 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "gulp-autoprefixer": "^0.0.7", "gulp-clean": "^0.3.1", "gulp-concat": "^2.3.4", + "gulp-filter": "^0.4.1", "gulp-grunt": "^0.5.2", "gulp-imagemin": "^0.6.0", "gulp-jshint": "^1.8.4",