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

Add debug option if env preset selected. #1225

Merged
merged 5 commits into from
Apr 16, 2017

Conversation

yavorsky
Copy link
Member

@yavorsky yavorsky commented Apr 6, 2017

With evaluate:

screen shot 2017-04-07 at 02 53 58

With huge output (scrollable):
screen shot 2017-04-07 at 02 53 29

debug option is appearing only when env preset was selected (like built-ins).

return item.name + ' ' + JSON.stringify(item.targets);
}

function onEnvBuild(node, opts, envResult) {
Copy link
Member

@existentialism existentialism Apr 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to consider is, that once babel/babel-preset-env#241 lands, we're likely going to follow that up with plugin-dependent debug output.

We might want to expose the debug output from directly from the plugin on onPresetBuild instead of needing to reconstruct it from structured data?

(And, maybe even stepping further back, @hzoo and I were discussing that maybe having debug output for every transform would be really useful... so this might be the beginnings of a consistent way of accessing it?)

Not something we need to address until v2.x and B7 drop, just food for thought.

Copy link
Member Author

@yavorsky yavorsky Apr 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@existentialism Yeah. I think there would be a couple of changes after 2.0 merge. So we'll keep our fingers on the pulse.

We might want to expose the debug output from directly from the plugin on onPresetBuild instead of needing to reconstruct it from structured data?

Initially, I had chosen this way, but decided that we could come up with awesome UI idea to display plugins/built-ins neat (maybe in the table or with the better colorful console). 🌅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, definitely! I think there's value in both raw debug + structured data.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, seems like we depend on https://github.com/yavorsky/babel-preset-env-standalone, so maybe move it to babel/babel-preset-env-standalone? I can ask him 🙂.

@existentialism existentialism merged commit eeb3754 into babel:master Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants