summaryrefslogtreecommitdiff
path: root/web-ui/config
diff options
context:
space:
mode:
authorAnike Arni <aarni@thoughtworks.com>2017-02-23 16:38:24 -0300
committerAnike Arni <aarni@thoughtworks.com>2017-02-23 16:38:24 -0300
commitd13543e3e680d47c7c675a9684d9854f2397aadb (patch)
tree961032a4e17e08876a9197f8bb49e2906329cf73 /web-ui/config
parentedf6c0356ed78dd6d5c0cdce6b716fbf2b93ae76 (diff)
[#907] Minifies svg images
with @thaissiqueira
Diffstat (limited to 'web-ui/config')
-rw-r--r--web-ui/config/imagemin.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/web-ui/config/imagemin.js b/web-ui/config/imagemin.js
index ed61cdb3..40c84f1c 100644
--- a/web-ui/config/imagemin.js
+++ b/web-ui/config/imagemin.js
@@ -16,10 +16,17 @@
*/
const imagemin = require('imagemin');
+const imageminSvgo = require('imagemin-svgo');
-imagemin(['app/images/*.{gif,jpg,png,svg}'],
- 'dist/public/images'
-).then(files => {
+imagemin(['app/images/*.{gif,jpg,png,svg}'], 'dist/public/images', {
+ use: [
+ imageminSvgo({
+ plugins: [
+ {removeViewBox: false}
+ ]
+ })
+ ]
+}).then(files => {
console.log('Images list:')
files.map(function(file) { console.log(file.path); });
});