kwelch / babel-plugin-captains-log

Babel plugin that injects helpful details into console statements
MIT License
85 stars 5 forks source link

Options don't work #12

Closed mqklin closed 7 years ago

mqklin commented 7 years ago

If I put some options (eg ["captains-log", {"injectScope": false}],) it stops work. See this PR for example.

kwelch commented 7 years ago

Yes, this I know what this is. I need to work on the defaults/option resolution. Additionally, I want to remove injectScope as a default and move it to experimental as it doesn't work properly. See #10.

I will set some time aside tonight to resolve this.

kwelch commented 7 years ago

This was fixed and released as v0.6.1.

Additionally, I have released v0.7.0 that sets injectScope to false by default. See the release notes for a deeper explanation.

mqklin commented 7 years ago

Thank you!

mqklin commented 7 years ago

Personally I use only injectVariableName (because usually I debug only one file on time, but sometimes many console.log there ), so my config now is ['captains-log', {injectFileName: false}],.

kwelch commented 7 years ago

Ok good to know. If you have any suggestions on how to make that smoother let me know. I prefer to give as much flexibility as possible, but options is an odd time to make the choice.

I am glad you like name injection, that is the main reason I wrote this. I really want to expand it beyond variables, to methods or object properties.

Feel free to open any issues for enhancements as well. Thanks!

mqklin commented 7 years ago

Thank you for this very useful plugin, it saves a lot of time.

kwelch commented 7 years ago

I appreciate that.