lib/thematic.js
function(source) {
    if (typeof source === 'object') {
      this.ast = source;
    }
    else if (typeof source === 'string') {
      // JSON source:
      if (isJSON(source)) {
        this.ast = JSON.parse(source);
      }
      // Sass source:
      else {
        this.ast = gonzales.parse(source, {syntax: 'scss'});
      }
    }
    else {
      throw 'Source could not be loaded.';
    }

    return this.resetMapping();
  }
function(source) {
    if (typeof source === 'object') {
      this.ast = source;
    }
    else if (typeof source === 'string') {
      // JSON source:
      if (isJSON(source)) {
        this.ast = JSON.parse(source);
      }
      // Sass source:
      else {
        this.ast = gonzales.parse(source, {syntax: 'scss'});
      }
    }
    else {
      throw 'Source could not be loaded.';
    }

    return this.resetMapping();
  }
function ( source ) { if ( typeof source === 'object' ) { this . ast = source ; } else if ( typeof source === 'string' ) { // JSON source: if ( isJSON ( source ) ) { this . ast = JSON . parse ( source ) ; } // Sass source: else { this . ast = gonzales . parse ( source , { syntax : 'scss' } ) ; } } else { throw 'Source could not be loaded.' ; } return this . resetMapping ( ) ; }
Loads a source file into the renderer.
@param {String|Object} source AST, JSON string, or Sass string.
@returns {SassThematic} self reference.
Loads a source file into the renderer .