From 47544aa067fb0119147e0e302a7f08e215f0e88f Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Sun, 26 Jun 2016 08:13:46 +0200 Subject: Updated minifiers and packaging accordingly --- web-ui/config/imagemin.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'web-ui/config') diff --git a/web-ui/config/imagemin.js b/web-ui/config/imagemin.js index 7d0be6df..2b2c87e0 100644 --- a/web-ui/config/imagemin.js +++ b/web-ui/config/imagemin.js @@ -1,6 +1,6 @@ /* - * Copyright (c) 2014 ThoughtWorks, Inc. - * + * Copyright (c) 2016 ThoughtWorks, Inc. + * * Pixelated is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -15,17 +15,11 @@ * along with Pixelated. If not, see . */ -var Imagemin = require('imagemin'); - -var imagemin = new Imagemin() - .src('app/images/*.{gif,jpg,png,svg}') - .dest('dist/images') - .use(Imagemin.jpegtran({ progressive: true })); - -imagemin.run(function (err, files) { - if (err) { - throw err; - } +const imagemin = require('imagemin'); - console.log(files[0]); +imagemin(['app/images/*.{gif,jpg,png,svg}'], + 'dist/images' +).then(files => { + console.log('Images list:') + files.map(function(file) { console.log(file.path); }); }); -- cgit v1.2.3