lib/thematic.js
function(done) {
    var isSync = (typeof done !== 'function');
    var sass = require('node-sass');
    var opts = this.sassCSSOptions();

    if (isSync) {
      try {
        return sass.renderSync(opts).css.toString();
      } catch (err) {
        throw formatSassError(err, opts.data);
      }
    }

    sass.render(opts, function(err, result) {
      if (err) return done(formatSassError(err, opts.data));
      done(null, result.css.toString());
    });
  }
function(done) {
    var isSync = (typeof done !== 'function');
    var sass = require('node-sass');
    var opts = this.sassCSSOptions();

    if (isSync) {
      try {
        return sass.renderSync(opts).css.toString();
      } catch (err) {
        throw formatSassError(err, opts.data);
      }
    }

    sass.render(opts, function(err, result) {
      if (err) return done(formatSassError(err, opts.data));
      done(null, result.css.toString());
    });
  }
function ( done ) { var isSync = ( typeof done !== 'function' ) ; var sass = require ( 'node-sass' ) ; var opts = this . sassCSSOptions ( ) ; if ( isSync ) { try { return sass . renderSync ( opts ) . css . toString ( ) ; } catch ( err ) { throw formatSassError ( err , opts . data ) ; } } sass . render ( opts , function ( err , result ) { if ( err ) return done ( formatSassError ( err , opts . data ) ) ; done ( null , result . css . toString ( ) ) ; } ) ; }
Low-level implementation of CSS rendering.
@param {Function} callback for asynchronous rendering.
@returns {String|undefined} rendered CSS string (sync) or undefined (async).
@private
Low - level implementation of CSS rendering .