/*!
 * node-minify
 * Copyright(c) 2011-2016 Rodolphe Stoclin
 * MIT Licensed
 */

'use strict';

/**
 * Module dependencies.
 */

var Promise = require('bluebird');
var csso = require('csso');
var utils = require('../utils');

/**
 * Expose `compressCSSO()`.
 */

module.exports = compressCSSO;

/**
 * Run csso.
 *
 * @param {Object} settings
 * @param {String} content
 */

function compressCSSO(settings, content) {
  return new Promise(function(resolve) {
    var contentMinified = csso.minify(content, settings.options.restructureOff);
    utils.writeFile(settings.output, contentMinified);
    resolve(contentMinified);
  });
}

/*!
 * node-minify
 * Copyright(c) 2011-2016 Rodolphe Stoclin
 * MIT Licensed
 */

'use strict';

/**
 * Module dependencies.
 */

var Promise = require('bluebird');
var csso = require('csso');
var utils = require('../utils');

/**
 * Expose `compressCSSO()`.
 */

module.exports = compressCSSO;

/**
 * Run csso.
 *
 * @param {Object} settings
 * @param {String} content
 */

function compressCSSO(settings, content) {
  return new Promise(function(resolve) {
    var contentMinified = csso.minify(content, settings.options.restructureOff);
    utils.writeFile(settings.output, contentMinified.css);
    resolve(contentMinified.css);
  });
}

Fix CSSO compressor output due to package upgrade
Fix CSSO compressor output due to package upgrade
