Stylecow v3.1.0 Release Notes

    • Implemented source maps
    • ๐Ÿ‘Œ Improved error handling. Now on error, a stylecow.Error() class is throwed
    • ๐Ÿ’… Changed the way the code is generated. Now there is the stylecow.Code class. For example:
    var stylecow = require('stylecow');
    //Get some code
    var css = stylecow.createFromFile('my-styles.css');
    //Configure the code
    var code = new stylecow.Code(css, {
        output: 'styles.min.css', //output filename
        style: 'minify', //minify the code
        sourceMap: '',  //The source map file
        previousSourceMap: '' //Set this value if there is the file has a source map created by other preprocessor, such less/sass and it's not defined in the code.
    //Save the output css file and source map;
    //Get the code as string:
    //Get the source map
    • ๐Ÿ†• New stylecow.merge() function to merge two files: ```js var main_css = stylecow.createFromFile('styles1.css'); var other_css = stylecow.createFromFile('styles2.css');

    //Merges "other_css" into "main_css" stylecow.merge(main_css, other_css);