1.0.0 • Published 11 years ago
cssbeautifier v1.0.0
cssbeautifier
Beautify css code
var cssbeautifier = require('cssbeautifier');install
npm install cssbeautifier --savetest
mochaAPI
cssbeautifier(str, options)
- {string|readstream}
strrequired
The code string or file stream - {object}
options- {string}
indentoptions.indent = ' '
Indent for css property - {boolean}
ruleNewlineoptions.boolean = false
a new rule start with new line - {string}
filepath
useful for error message, if use read stream, you can optional this param. - {function}
done
when the first param is stream, it's async.
- {string}
var css = cssbeautifier('a{color: red}');
// or stream
cssbeautifier(fs.createReadStream('path/demo.css'), {
done: function(css) {
}
})1.0.0
11 years ago