src/manager.js
// current state with the brand new data
current state with the brand new data
current state with the brand new data
@bind
  onData(sender, _data) {
    console.log('Recived data:', _data)
    const spliced = _data.split('\n')
    for (let i = 0; i < spliced.length; i++) {
      const data = spliced[i]
      if(isEmptyBlank(data)) break
      try {
        const parsed = JSON.parse(data)
        this.log.push(parsed)
      } catch (e) {
        return console.warn(
          'Corrupted output from yarn process:', e, data
        )
      }
    }
  }
@ bind onData ( sender , _data ) { console . log ( 'Recived data:' , _data ) const spliced = _data . split ( '\n' ) for ( let i = 0 ; i < spliced . length ; i ++ ) { const data = spliced [ i ] if ( isEmptyBlank ( data ) ) break try { const parsed = JSON . parse ( data ) this . log . push ( parsed ) } catch ( e ) { return console . warn ( 'Corrupted output from yarn process:' , e , data ) } } }
current state with the brand new data
current state with the brand new data
// Logging purpuses // parse the data and push it to // the logs // If we catch an error in the parsing // we warn it to the console