All Projects → scniro → Gulp Clean Css

scniro / Gulp Clean Css

Licence: mit
Minify css with clean-css.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Gulp Clean Css

Meantorrent
meanTorrent - MEAN.JS BitTorrent Private Tracker - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js, A BitTorrent Private Tracker CMS with Multilingual, and IRC announce support, CloudFlare support. Demo at:
Stars: ✭ 438 (-30.59%)
Mutual labels:  gulp
Long Haul
A minimal, type-focused Jekyll theme.
Stars: ✭ 524 (-16.96%)
Mutual labels:  gulp
Blendid
A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
Stars: ✭ 5,026 (+696.51%)
Mutual labels:  gulp
Neumorphism Ui Bootstrap
Neumorphism inspired UI Kit: web components, sections and pages in neumorphic style built with Bootstrap CSS Framework
Stars: ✭ 463 (-26.62%)
Mutual labels:  gulp
Gulp Responsive
gulp-responsive generates images at different sizes
Stars: ✭ 509 (-19.33%)
Mutual labels:  gulp
Gulp Nodemon
gulp + nodemon + convenience
Stars: ✭ 531 (-15.85%)
Mutual labels:  gulp
Magento2 Frontools
Set of front-end tools for Magento 2 based on Gulp.js
Stars: ✭ 416 (-34.07%)
Mutual labels:  gulp
Frontend Cheat Sheets
Collection of cheat sheets(HTML, CSS, JS, Git, Gulp, etc.,) for your frontend development needs & reference
Stars: ✭ 604 (-4.28%)
Mutual labels:  gulp
Gulp Pug
Gulp plugin for compiling Pug templates
Stars: ✭ 512 (-18.86%)
Mutual labels:  gulp
Fastshell
Fiercely quick front-end boilerplate and workflows, HTML5, Gulp, Sass
Stars: ✭ 563 (-10.78%)
Mutual labels:  gulp
Kickoff
🏀 A lightweight front-end framework for creating scalable, responsive sites. Version 8 has just been released!
Stars: ✭ 465 (-26.31%)
Mutual labels:  gulp
Gulp Shell
A handy command line interface for gulp
Stars: ✭ 474 (-24.88%)
Mutual labels:  gulp
Angular Starter
⭐️ Gulp Angular Starter using TypeScript (Updated to 4.4.3)
Stars: ✭ 538 (-14.74%)
Mutual labels:  gulp
Fetool
大前端的瑞士军刀,只记录有用的。
Stars: ✭ 4,328 (+585.9%)
Mutual labels:  gulp
Awesome Gulp
🍹 A curated list of awesome gulp resources, plugins, and boilerplates for a better development workflow automation - http://alferov.github.io/awesome-gulp
Stars: ✭ 577 (-8.56%)
Mutual labels:  gulp
Made Mistakes Jekyll
Source for my website and blog (Jekyll + Gulp + Netlify)
Stars: ✭ 436 (-30.9%)
Mutual labels:  gulp
Gulp Angular Templatecache
Concatenates and registers AngularJS templates in the $templateCache.
Stars: ✭ 530 (-16.01%)
Mutual labels:  gulp
Vue Chat
📲 A web chat application. Vue + node(koa2) + Mysql + socket.io
Stars: ✭ 617 (-2.22%)
Mutual labels:  gulp
Nth Start Project
Startkit for HTML / CSS / JS pages layout.
Stars: ✭ 578 (-8.4%)
Mutual labels:  gulp
Panini
A super simple flat file generator.
Stars: ✭ 562 (-10.94%)
Mutual labels:  gulp

gulp-clean-css

Build Status Dependency Status devDependency Status Coverage Downloads NPM Version Awesome

gulp plugin to minify CSS, using clean-css

Regarding Issues

This is just a simple gulp plugin, which means it's nothing more than a thin wrapper around clean-css. If it looks like you are having CSS related issues, please contact clean-css. Only create a new issue if it looks like you're having a problem with the plugin itself.

Install

npm install gulp-clean-css --save-dev

API

cleanCSS([options], [callback])

options

See the CleanCSS options.

const gulp = require('gulp');
const cleanCSS = require('gulp-clean-css');

gulp.task('minify-css', () => {
  return gulp.src('styles/*.css')
    .pipe(cleanCSS({compatibility: 'ie8'}))
    .pipe(gulp.dest('dist'));
});

callback

Useful for returning details from the underlying minify() call. An example use case could include logging stats of the minified file. In addition to the default object, gulp-clean-css provides the file name and path for further analysis.

const gulp = require('gulp');
const cleanCSS = require('gulp-clean-css');

gulp.task('minify-css', () => {
  return gulp.src('styles/*.css')
    .pipe(cleanCSS({debug: true}, (details) => {
      console.log(`${details.name}: ${details.stats.originalSize}`);
      console.log(`${details.name}: ${details.stats.minifiedSize}`);
    }))
  .pipe(gulp.dest('dist'));
});

Source Maps can be generated by using gulp-sourcemaps.

const gulp = require('gulp');
const cleanCSS = require('gulp-clean-css');
const sourcemaps = require('gulp-sourcemaps');

gulp.task('minify-css',() => {
  return gulp.src('./src/*.css')
    .pipe(sourcemaps.init())
    .pipe(cleanCSS())
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('dist'));
});

License

MIT © 2020 scniro

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].