lib/compactor.js
function indent(level) {
    var val = options.indent
    _indent = ''

    if (_lastch === null)
      _lastch = _to                 // as-is, this is the first file
    else if (_lastch !== _to) {
      _lastch = _to
      // istanbul ignore else
      if (output)
        output.emit('data', _to)    // force eol after insert file
    }

    if (level > 0 && val && !/^0+\D?/.test(val)) {
      // format is 2, 2t, 2s, etc. default is spaces
      var match = /^(\d+)\s*(t?)/.exec(val),
          count = level * (match[1] | 0)
      _indent = Array(count + 1).join(match[2] ? '\t' : ' ')
    }
  }
function indent(level) {
    var val = options.indent
    _indent = ''

    if (_lastch === null)
      _lastch = _to                 // as-is, this is the first file
    else if (_lastch !== _to) {
      _lastch = _to
      // istanbul ignore else
      if (output)
        output.emit('data', _to)    // force eol after insert file
    }

    if (level > 0 && val && !/^0+\D?/.test(val)) {
      // format is 2, 2t, 2s, etc. default is spaces
      var match = /^(\d+)\s*(t?)/.exec(val),
          count = level * (match[1] | 0)
      _indent = Array(count + 1).join(match[2] ? '\t' : ' ')
    }
  }
function indent ( level ) { var val = options . indent _indent = '' if ( _lastch === null ) _lastch = _to // as-is, this is the first file else if ( _lastch !== _to ) { _lastch = _to // istanbul ignore else if ( output ) output . emit ( 'data' , _to ) // force eol after insert file } if ( level > 0 && val && ! / ^0+\D? / . test ( val ) ) { // format is 2, 2t, 2s, etc. default is spaces var match = / ^(\d+)\s*(t?) / . exec ( val ) , count = level * ( match [ 1 ] | 0 ) _indent = Array ( count + 1 ) . join ( match [ 2 ] ? '\t' : ' ' ) } }
On file change, reset indentation
On file change reset indentation