0.1.6 • Published 10 years ago

css-prettifier v0.1.6

Weekly downloads
4
License
-
Repository
github
Last release
10 years ago

CSS Prettifier Build Status Dependencies update check badge

CSS prettifier in your style.

Sample

Node.js

var fs = require("fs");
var path = require("path");
var options = {
    decl: {
        before: '\n\t'
    },
    selectors: 'separateline'
};
var cssprettifier = require("../lib/css-prettifier");
var processor = cssprettifier(options);
var css = fs.readFileSync("before.css");
var result = processor.process(css, {
    map: true,
    from: "prefixer.css",
    to: "after.css"
});


fs.writeFileSync("after.css", result.css.trim());

Before execution css is:

p, ul {
  margin-bottom: 1em;
}

.lyt-column .unit {
  float: left;
  margin-right: 20px;
}
.lyt-column .unit.last-unit {
  margin-right: 0;
}

After execution css is:

p,
ul {
	margin-bottom: 1em;
}

.lyt-column .unit {
	float: left;
	margin-right: 20px;
}
.lyt-column .unit.last-unit {
	margin-right: 0;
}

Usage

Grunt.js

You can use the grunt-csspretty plugin for Grunt.js.

gulp.js

You can use the gulp-csspretty plugin for gulp.js.

0.1.6

10 years ago

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago