Removed gulp-minify-css. Added gulp-cssnano. Fixed #1890.

This commit is contained in:
Norman Jäckel 2016-02-05 15:33:17 +01:00
parent eaea41564c
commit b25ba01c0f
2 changed files with 8 additions and 3 deletions

View File

@ -12,14 +12,18 @@
* for production mode. * for production mode.
*/ */
// TODO: Remove the next line when support for Node 0.10.x is dropped.
// See https://github.com/postcss/postcss#nodejs-010-and-the-promise-api
require('es6-promise').polyfill();
var argv = require('yargs').argv, var argv = require('yargs').argv,
gulp = require('gulp'), gulp = require('gulp'),
concat = require('gulp-concat'), concat = require('gulp-concat'),
cssnano = require('gulp-cssnano'),
gulpif = require('gulp-if'), gulpif = require('gulp-if'),
gettext = require('gulp-angular-gettext'), gettext = require('gulp-angular-gettext'),
jshint = require('gulp-jshint'), jshint = require('gulp-jshint'),
mainBowerFiles = require('main-bower-files'), mainBowerFiles = require('main-bower-files'),
minifyCSS = require('gulp-minify-css'),
path = require('path'), path = require('path'),
rename = require('gulp-rename'), rename = require('gulp-rename'),
through = require('through2'), through = require('through2'),
@ -52,7 +56,7 @@ gulp.task('css-libs', function () {
filter: /\.css$/ filter: /\.css$/
})) }))
.pipe(concat('openslides-libs.css')) .pipe(concat('openslides-libs.css'))
.pipe(gulpif(argv.production, minifyCSS())) .pipe(gulpif(argv.production, cssnano()))
.pipe(gulp.dest(path.join(output_directory, 'css'))); .pipe(gulp.dest(path.join(output_directory, 'css')));
}); });

View File

@ -3,12 +3,13 @@
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"bower": "~1.7.2", "bower": "~1.7.2",
"es6-promise": "~3.0.2",
"gulp": "~3.9.0", "gulp": "~3.9.0",
"gulp-angular-gettext": "~2.1.0", "gulp-angular-gettext": "~2.1.0",
"gulp-concat": "~2.6.0", "gulp-concat": "~2.6.0",
"gulp-cssnano": "~2.1.0",
"gulp-if": "~2.0.0", "gulp-if": "~2.0.0",
"gulp-jshint": "~2.0.0", "gulp-jshint": "~2.0.0",
"gulp-minify-css": "~1.2.3",
"gulp-rename": "~1.2.2", "gulp-rename": "~1.2.2",
"gulp-uglify": "~1.5.1", "gulp-uglify": "~1.5.1",
"main-bower-files": "~2.11.1", "main-bower-files": "~2.11.1",