| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /*! | 1 /*! |
| 2 * This file is part of help.eyeo.com. | 2 * This file is part of help.eyeo.com. |
| 3 * Copyright (C) 2017-present eyeo GmbH | 3 * Copyright (C) 2017-present eyeo GmbH |
| 4 * | 4 * |
| 5 * help.eyeo.com is free software: you can redistribute it and/or modify | 5 * help.eyeo.com is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License as published by | 6 * it under the terms of the GNU General Public License as published by |
| 7 * the Free Software Foundation, either version 3 of the License, or | 7 * the Free Software Foundation, either version 3 of the License, or |
| 8 * (at your option) any later version. | 8 * (at your option) any later version. |
| 9 * | 9 * |
| 10 * help.eyeo.com is distributed in the hope that it will be useful, | 10 * help.eyeo.com is distributed in the hope that it will be useful, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 .pipe(sourcemaps.write("./")) | 56 .pipe(sourcemaps.write("./")) |
| 57 .pipe(gulp.dest("./static/dist/js")) | 57 .pipe(gulp.dest("./static/dist/js")) |
| 58 }); | 58 }); |
| 59 | 59 |
| 60 /****************************************************************************** | 60 /****************************************************************************** |
| 61 * Images | 61 * Images |
| 62 ******************************************************************************/ | 62 ******************************************************************************/ |
| 63 | 63 |
| 64 gulp.task("img", function() { | 64 gulp.task("img", function() { |
| 65 return gulp.src(["./static/src/img/**"]) | 65 return gulp.src(["./static/src/img/**"]) |
| 66 .pipe(imagemin([ | 66 .pipe(imagemin([ |
|
juliandoucette
2017/12/14 13:01:44
This could be an expensive process. I wonder if we
ire
2017/12/16 09:59:24
If I go with my suggestion for this task to replac
juliandoucette
2017/12/18 17:11:16
Are you suggesting that we run this task to automa
ire
2017/12/20 08:44:20
Yes. Since the gulp task is watching the src/img d
| |
| 67 imagemin.svgo({ | 67 imagemin.svgo({ |
| 68 plugins: [ | 68 plugins: [ |
| 69 {removeDimensions: false}, | 69 {removeDimensions: false}, |
| 70 {removeXMLNS: false}, | 70 {removeXMLNS: false}, |
| 71 {cleanupIDs: true} | 71 {cleanupIDs: true} |
| 72 ] | 72 ] |
| 73 }) | 73 }) |
| 74 ])) | 74 ])) |
| 75 .pipe(gulp.dest("./static/dist/img")); | 75 .pipe(gulp.dest("./static/dist/img")); |
| 76 }); | 76 }); |
| 77 | 77 |
| 78 /****************************************************************************** | 78 /****************************************************************************** |
| 79 * Fonts | 79 * Fonts |
| 80 ******************************************************************************/ | 80 ******************************************************************************/ |
| 81 | 81 |
| 82 gulp.task("fonts", function() { | 82 gulp.task("fonts", function() { |
| 83 return gulp.src(["./static/src/fonts/**"]) | 83 return gulp.src(["./static/src/fonts/**"]) |
|
ire
2017/12/13 12:15:43
I couldn't find any information on build/optimisat
juliandoucette
2017/12/14 13:01:44
I wonder if this is necessary / how much overhead
ire
2017/12/16 09:59:24
Probably not necessary, just thought to mention it
juliandoucette
2017/12/18 17:11:16
I think we can exclude this then (and add it later
ire
2017/12/20 08:44:20
Do you mean to exclude this whole task? Or to excl
juliandoucette
2018/01/04 15:45:35
Exclude imagemin. Excluding the whole task would m
ire
2018/01/05 07:56:08
Ack. That's what I thought, just confirming. Done.
| |
| 84 .pipe(imagemin([ | |
| 85 imagemin.svgo({ | |
| 86 plugins: [ | |
| 87 {removeDimensions: false}, | |
| 88 {removeXMLNS: false}, | |
| 89 {cleanupIDs: true} | |
| 90 ] | |
| 91 }) | |
| 92 ])) | |
| 93 .pipe(gulp.dest("./static/dist/fonts")); | 84 .pipe(gulp.dest("./static/dist/fonts")); |
| 94 }); | 85 }); |
| 95 | 86 |
| 96 /****************************************************************************** | 87 /****************************************************************************** |
| 97 * Watch | 88 * Watch |
| 98 ******************************************************************************/ | 89 ******************************************************************************/ |
| 99 | 90 |
| 100 gulp.task("watch", function() { | 91 gulp.task("watch", function() { |
| 101 gulp.watch("./static/src/scss/**/*.scss", ["css"]); | 92 gulp.watch("./static/src/scss/**/*.scss", ["css"]); |
| 102 gulp.watch("./static/src/js/**/*.js", ["js"]); | 93 gulp.watch("./static/src/js/**/*.js", ["js"]); |
| 103 gulp.watch("./static/src/img/**", ["img"]); | 94 gulp.watch("./static/src/img/**", ["img"]); |
| 104 gulp.watch("./static/src/fonts/**", ["fonts"]); | 95 gulp.watch("./static/src/fonts/**", ["fonts"]); |
| 105 }); | 96 }); |
| 106 | 97 |
| 107 /****************************************************************************** | 98 /****************************************************************************** |
| 108 * Default | 99 * Default |
| 109 ******************************************************************************/ | 100 ******************************************************************************/ |
| 110 | 101 |
| 111 gulp.task("default", ["css", "js", "img", "fonts", "watch"]); | 102 gulp.task("default", ["css", "js", "img", "fonts", "watch"]); |
| LEFT | RIGHT |