jensoleg / swagger-ui

Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
http://swagger.io
Other
1.14k stars 310 forks source link

Minify css using css nano #60

Open hsingh23 opened 8 years ago

hsingh23 commented 8 years ago
var nano = require('gulp-cssnano');
/**
 * Processes less files into CSS files
 */
gulp.task('less', ['clean'], function() {

  return gulp
    .src([
      './src/main/less/screen.less',
      './src/main/less/print.less',
      './src/main/less/reset.less'
    ])
    .pipe(less())
    .pipe(concat('min.css'))
    .pipe(nano())
    .on('error', log)
    .pipe(gulp.dest('./src/main/html/css/'))
    .pipe(connect.reload());
});

and use min.css in the project