Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputting tons of JSON describing JSX elements #26

Closed
davidtheclark opened this issue Jan 12, 2015 · 2 comments
Closed

Outputting tons of JSON describing JSX elements #26

davidtheclark opened this issue Jan 12, 2015 · 2 comments

Comments

@davidtheclark
Copy link

The transform is logging tons of JSON describing JSX elements. It looks like this:

{ type: 'XJSOpeningElement',
  start: 611,
  end: 640,
  loc: 
   { start: { line: 27, column: 3 },
     end: { line: 27, column: 32 } },
  range: [ 611, 640 ],
  attributes: 
   [ { type: 'Property',
       kind: 'init',
       key: [Object],
       value: [Object],
       computed: undefined,
       loc: [Object],
       end: 639,
       range: [Object],
       start: 619,
       leadingComments: [],
       trailingComments: [] } ],
  name: 
   { type: 'Identifier',
     start: 612,
     end: 618,
     loc: { start: [Object], end: [Object] },
     range: [ 612, 618 ],
     name: 'legend' },
  selfClosing: false }
{ type: 'XJSOpeningElement',
  start: 667,
  end: 716,
  loc: 
   { start: { line: 30, column: 4 },
     end: { line: 30, column: 53 } },
  range: [ 667, 716 ],
  attributes: 
   [ { type: 'Property',
       kind: 'init',
       key: [Object],
       value: [Object],
       computed: undefined,
       loc: [Object],
       end: 713,
       range: [Object],
       start: 681,
       leadingComments: [],
       trailingComments: [] } ],
  name: 
   { type: 'Identifier',
     start: 668,
     end: 680,
     loc: { start: [Object], end: [Object] },
     range: [ 668, 680 ],
     name: 'RequiredMark' },
  selfClosing: true }
{ type: 'XJSOpeningElement',
  start: 437,
  end: 484,
  loc: 
   { start: { line: 23, column: 3 },
     end: { line: 23, column: 50 } },
  range: [ 437, 484 ],
  attributes: 
   [ { type: 'Property',
       kind: 'init',
       key: [Object],
       value: [Object],
       computed: undefined,
       loc: [Object],
       end: 483,
       range: [Object],
       start: 443,
       leadingComments: [],
       trailingComments: [] } ],
  name: 
   { type: 'Identifier',
     start: 438,
     end: 442,
     loc: { start: [Object], end: [Object] },
     range: [ 438, 442 ],
     name: 'span' },
  selfClosing: false }

If I use browserify/6to5ify via the JS API, all this junk outputs to the console but the compiled code seems to work fine. However, if I use the browserify CLI and 6to5ify, the junk shows up at the top of the compiled code.

Any idea what is going on?

@sebmck
Copy link

sebmck commented Jan 12, 2015

Sorry! Looks like I accidently left a console.log in the last release... Fixed by babel/babel#469 and released as of 2.11.1

@sebmck sebmck closed this as completed Jan 12, 2015
@davidtheclark
Copy link
Author

Glad it was an easy fix. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants