comparison gulpfile.js @ 1069:dff873f11541

admin: Upgrade Bootstrap, switch icons to Open-Iconic, remove Bower.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 13 Feb 2018 23:22:27 -0800
parents 4d0f80b2ba7f
children 7eb58b5748eb
comparison
equal deleted inserted replaced
1068:137c9b41edd2 1069:dff873f11541
15 //.pipe(sourcemaps.init()) 15 //.pipe(sourcemaps.init())
16 .pipe(sass({ 16 .pipe(sass({
17 errLogToConsole: true, 17 errLogToConsole: true,
18 outputStyle: 'compressed', 18 outputStyle: 'compressed',
19 includePaths: [ 19 includePaths: [
20 'bower_components/bootstrap-sass/assets/stylesheets', 20 'node_modules/bootstrap/scss',
21 'bower_components/Ionicons/scss']})) 21 'node_modules/open-iconic/font/css']}))
22 .pipe(cssnano()) 22 .pipe(cssnano())
23 //.pipe(sourcemaps.write()) 23 //.pipe(sourcemaps.write())
24 .pipe(rename({suffix: '.min'})) 24 .pipe(rename({suffix: '.min'}))
25 .pipe(gulp.dest('piecrust/admin/static/css')); 25 .pipe(gulp.dest('piecrust/admin/static/css'));
26 }); 26 });
29 }); 29 });
30 30
31 // Javascript 31 // Javascript
32 gulp.task('js', function() { 32 gulp.task('js', function() {
33 return gulp.src([ 33 return gulp.src([
34 'bower_components/jquery/dist/jquery.js', 34 'node_modules/jquery/dist/jquery.min.js',
35 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/alert.js', 35 'node_modules/bootstrap/dist/js/bootstrap.min.js',
36 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/button.js', 36 'node_modules/timeago/jquery.timeago.js',
37 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/collapse.js',
38 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/dropdown.js',
39 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/modal.js',
40 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/tooltip.js',
41 'bower_components/bootstrap-sass/assets/javascripts/bootstrap/transition.js',
42 'bower_components/jquery-timeago/jquery.timeago.js',
43 'piecrust/admin/assets/js/**/*.js' 37 'piecrust/admin/assets/js/**/*.js'
44 ]) 38 ])
45 .pipe(sourcemaps.init()) 39 .pipe(sourcemaps.init())
46 .pipe(concat('foodtruck.js')) 40 .pipe(concat('foodtruck.js'))
47 //.pipe(uglify()) 41 //.pipe(uglify())
54 }); 48 });
55 49
56 // Fonts/images 50 // Fonts/images
57 gulp.task('fonts', function() { 51 gulp.task('fonts', function() {
58 return gulp.src([ 52 return gulp.src([
59 'bower_components/bootstrap-sass/assets/fonts/bootstrap/*', 53 'node_modules/open-iconic/font/fonts/*'
60 'bower_components/Ionicons/fonts/*'
61 ]) 54 ])
62 .pipe(gulp.dest('piecrust/admin/static/fonts')); 55 .pipe(gulp.dest('piecrust/admin/static/fonts'));
63 }); 56 });
64 57
65 gulp.task('images', function() { 58 gulp.task('images', function() {
66 return gulp.src([ 59 return gulp.src([
67 'bower_components/bootstrap-sass/assets/images/*',
68 'piecrust/admin/assets/img/*' 60 'piecrust/admin/assets/img/*'
69 ]) 61 ])
70 .pipe(gulp.dest('piecrust/admin/static/img')); 62 .pipe(gulp.dest('piecrust/admin/static/img'));
71 }); 63 });
72 64