diff options
author | Bruno Wagner <bwagner@riseup.net> | 2016-06-26 08:13:46 +0200 |
---|---|---|
committer | Bruno Wagner <bwagner@riseup.net> | 2016-06-26 08:17:24 +0200 |
commit | 47544aa067fb0119147e0e302a7f08e215f0e88f (patch) | |
tree | d25ced3bbc5c14b5d45a5ab22ff22fd4e23e3ed2 /web-ui/config | |
parent | b4add4e3481ef5a3d53f8af0739bc3b8048d32bf (diff) |
Updated minifiers and packaging accordingly
Diffstat (limited to 'web-ui/config')
-rw-r--r-- | web-ui/config/imagemin.js | 22 |
1 files changed, 8 insertions, 14 deletions
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 <http://www.gnu.org/licenses/>. */ -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); }); }); |