All Projects → jonkemp → gulp-cssbeautify

jonkemp / gulp-cssbeautify

Licence: MIT license
Reindent and reformat CSS

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to gulp-cssbeautify

Gulp Bro
👊 gulp + browserify + incremental build, done right.
Stars: ✭ 119 (+561.11%)
Mutual labels:  gulp-plugin
Gulp Traceur
Traceur is a JavaScript.next to JavaScript-of-today compiler
Stars: ✭ 172 (+855.56%)
Mutual labels:  gulp-plugin
Gulp Strip Debug
Strip console, alert, and debugger statements from JavaScript code
Stars: ✭ 242 (+1244.44%)
Mutual labels:  gulp-plugin
Glup
Some of the gulp tutorial -《gulp笔记》
Stars: ✭ 136 (+655.56%)
Mutual labels:  gulp-plugin
Gulp Tap
Easily tap into a gulp pipeline without creating a plugin.
Stars: ✭ 158 (+777.78%)
Mutual labels:  gulp-plugin
Gulp Webp
Convert images to WebP
Stars: ✭ 187 (+938.89%)
Mutual labels:  gulp-plugin
Gulp Jasmine
Run Jasmine tests in Node.js
Stars: ✭ 110 (+511.11%)
Mutual labels:  gulp-plugin
gulp-xo
Validate files with XO
Stars: ✭ 37 (+105.56%)
Mutual labels:  gulp-plugin
Gulp Markdown
Markdown to HTML
Stars: ✭ 167 (+827.78%)
Mutual labels:  gulp-plugin
Gulp Size
Display the size of your project
Stars: ✭ 225 (+1150%)
Mutual labels:  gulp-plugin
Gulp Nunjucks
Precompile Nunjucks templates
Stars: ✭ 143 (+694.44%)
Mutual labels:  gulp-plugin
Gulp Imagemin
Minify PNG, JPEG, GIF and SVG images
Stars: ✭ 1,860 (+10233.33%)
Mutual labels:  gulp-plugin
Gulp Html Replace
Replace build blocks in HTML. Like useref but done right.
Stars: ✭ 222 (+1133.33%)
Mutual labels:  gulp-plugin
Gulp Rev
Static asset revisioning by appending content hash to filenames: `unicorn.css` → `unicorn-d41d8cd98f.css`
Stars: ✭ 1,540 (+8455.56%)
Mutual labels:  gulp-plugin
gulp-upload-qcloud
腾讯云 cos 静态资源上传 gulp 插件
Stars: ✭ 18 (+0%)
Mutual labels:  gulp-plugin
Gulp Modernizr
Gulp wrapper for custom Modernizr builds
Stars: ✭ 111 (+516.67%)
Mutual labels:  gulp-plugin
Gulp Compass
Compass plugin for gulp
Stars: ✭ 177 (+883.33%)
Mutual labels:  gulp-plugin
gulp-sort
Sort files in stream by path or any custom sort comparator
Stars: ✭ 22 (+22.22%)
Mutual labels:  gulp-plugin
gulp-spsync-creds
Gulp plugin for synchronizing local files with a SharePoint library via user credentials
Stars: ✭ 12 (-33.33%)
Mutual labels:  gulp-plugin
Gulp Debug
Debug Vinyl file streams to see what files are run through your Gulp pipeline
Stars: ✭ 223 (+1138.89%)
Mutual labels:  gulp-plugin

gulp-cssbeautify Build Status Coverage Status

CSS Beautify automatically formats your style to be consistent and easy to read

Given the following style:

.menu{color:red} .navigation{background-color:#333}

CSS Beautify will produce:

.menu {
    color: red
}

.navigation {
    background-color: #333
}

Install

Install with npm

npm install --save-dev gulp-cssbeautify

Example

var gulp = require('gulp'),
    cssbeautify = require('gulp-cssbeautify');

gulp.task('css', function() {
    return gulp.src('./styles/*.css')
        .pipe(cssbeautify())
        .pipe(gulp.dest('./styles/'));
});

With options:

var gulp = require('gulp'),
    cssbeautify = require('gulp-cssbeautify');

gulp.task('css', function() {
    return gulp.src('./styles/*.css')
        .pipe(cssbeautify({
            indent: '  ',
            openbrace: 'separate-line',
            autosemicolon: true
        }))
        .pipe(gulp.dest('./styles/'));
});

API

cssbeautify(options)

options.indent

Type: String
Default: '    '

Spaces to use for indentation.

options.openbrace

Type: String
Default: end-of-line
Values: end-of-line, separate-line

Defines the placement of open curly brace.

options.autosemicolon

Type: Boolean
Default: false

Always inserts a semicolon after the last ruleset.

License

MIT © Jonathan Kemp

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].