summaryrefslogtreecommitdiff
path: root/web-ui/config/imagemin.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/config/imagemin.js')
-rw-r--r--web-ui/config/imagemin.js22
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); });
});