These are chat archives for opal/opal

25th
Mar 2018
Elia Schito
@elia
Mar 25 2018 19:12
@catmando have you isolated the code that errors on uglify?
Mitch VanDuyn
@catmando
Mar 25 2018 19:12
Yes
I guess it was my fault... here is the offending code:
    class CodeMirror < Hyperloop::Component

      attr_reader :editor

      after_mount do
        @editor = `CodeMirror(#{dom_node}, {
          value: #{@code.to_s},
          mode: 'text/x-ruby',
          matchBrackets: true,
          lineNumbers: false,
          indentUnit: 2,
          theme: 'github',
          readOnly: #{!!@read_only}
        });` # <---- this semi colon caused the program... removing it got us back on track
      end

      render(DIV)

    end
Elia Schito
@elia
Mar 25 2018 19:48
@catmando under the new rules a multiline x-string is left as is wrt semicolons, trusting the user to know what he's doing
Mitch VanDuyn
@catmando
Mar 25 2018 19:57
cool... thanks for the explanation