Merge pull request #1945 from normanjaeckel/MinifyCSS

Removed gulp-minify-css. Added gulp-cssnano. Fixed #1890.
This commit is contained in:
Emanuel Schütze 2016-02-05 16:32:14 +01:00
commit 773ce0537d
2 changed files with 8 additions and 3 deletions

View File

@ -12,14 +12,18 @@
* 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,
gulp = require('gulp'),
concat = require('gulp-concat'),
cssnano = require('gulp-cssnano'),
gulpif = require('gulp-if'),
gettext = require('gulp-angular-gettext'),
jshint = require('gulp-jshint'),
mainBowerFiles = require('main-bower-files'),
minifyCSS = require('gulp-minify-css'),
path = require('path'),
rename = require('gulp-rename'),
through = require('through2'),
@ -52,7 +56,7 @@ gulp.task('css-libs', function () {
filter: /\.css$/
}))
.pipe(concat('openslides-libs.css'))
.pipe(gulpif(argv.production, minifyCSS()))
.pipe(gulpif(argv.production, cssnano()))
.pipe(gulp.dest(path.join(output_directory, 'css')));
});

View File

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