babel-plugin-captains-log
Advanced tools
Comparing version 0.6.1 to 0.7.0
@@ -31,3 +31,3 @@ 'use strict'; | ||
var defaultSettings = { | ||
injectScope: true, | ||
injectScope: false, | ||
injectVariableName: true, | ||
@@ -34,0 +34,0 @@ injectFileName: true |
{ | ||
"name": "babel-plugin-captains-log", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist" |
@@ -10,4 +10,3 @@ # Captain's Log (☠️) | ||
[![MIT License](https://img.shields.io/npm/l/kwelch.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
[![Roadmap](https://img.shields.io/badge/%F0%9F%93%94-roadmap-CD9523.svg?style=flat-square)]([roadmap]) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) | ||
@@ -18,3 +17,2 @@ | ||
[![Tweet](https://img.shields.io/twitter/url/https/github.com/kwelch/babel-plugin-captains-log.svg?style=social)](https://twitter.com/intent/tweet?text=Check%20out%20babel-plugin-captains-log!%20https://github.com/kwelch/babel-plugin-captains-log%20%F0%9F%91%8D) | ||
[![Join the chat at https://gitter.im/babel-plugin-captains-log/Lobby](https://badges.gitter.im/babel-plugin-captains-log/Lobby.svg?style=flat-square)](https://gitter.im/babel-plugin-captains-log/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
@@ -26,3 +24,3 @@ ## Usage | ||
Default bahavior: | ||
- Prepend console statement scope | ||
- prepend console statement file & location | ||
- add inject variable name into console statements | ||
@@ -34,3 +32,3 @@ | ||
- console.log(a, b); | ||
+ console.log("simple.js(2:2)", "add:", "a", a, "b", b); | ||
+ console.log("simple.js(2:2)", "a", a, "b", b); | ||
return a + b; | ||
@@ -41,3 +39,3 @@ } | ||
- console.log(a, b); | ||
+ console.info("simple.js(7:2)", "subtract:", "a", a, "b", b); | ||
+ console.info("simple.js(7:2)", "a", a, "b", b); | ||
return a - b; | ||
@@ -116,3 +114,3 @@ }; | ||
#### Inject Scope | ||
#### Inject File Name | ||
**Default**: `true` | ||
@@ -124,3 +122,3 @@ | ||
["captains-log", { | ||
"injectScope": true | ||
"injectFileName": true | ||
}] | ||
@@ -131,5 +129,7 @@ ] | ||
#### Inject File Name | ||
**Default**: `true` | ||
#### Inject Scope _(Experimental)_ | ||
_This has a few issues with other plugins particularly react-hot-loader, as it changes method names. Also, it was written for recursion which adds too much noise to the console statement which is against this libraries purpose_ | ||
**Default**: `false` | ||
``` | ||
@@ -139,3 +139,3 @@ { | ||
["captains-log", { | ||
"injectFileName": true | ||
"injectScope": true | ||
}] | ||
@@ -146,6 +146,2 @@ ] | ||
## Roadmap | ||
- [ ] Add ability to timestamp console statements | ||
## License | ||
@@ -160,4 +156,4 @@ | ||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
| [<img src="https://avatars0.githubusercontent.com/u/1295580?v=3" width="100px;"/><br /><sub>Kyle Welch</sub>](http://www.krwelch.com)<br />[💻](https://github.com/kwelch/babel-plugin-captains-log/commits?author=kwelch "Code") [📖](https://github.com/kwelch/babel-plugin-captains-log/commits?author=kwelch "Documentation") [⚠️](https://github.com/kwelch/babel-plugin-captains-log/commits?author=kwelch "Tests") | | ||
| :---: | | ||
| [<img src="https://avatars0.githubusercontent.com/u/1295580?v=3" width="100px;"/><br /><sub>Kyle Welch</sub>](http://www.krwelch.com)<br />[💻](https://github.com/kwelch/babel-plugin-captains-log/commits?author=kwelch "Code") [📖](https://github.com/kwelch/babel-plugin-captains-log/commits?author=kwelch "Documentation") [⚠️](https://github.com/kwelch/babel-plugin-captains-log/commits?author=kwelch "Tests") | [<img src="https://avatars1.githubusercontent.com/u/9456433?v=4" width="100px;"/><br /><sub>Maksim</sub>](https://github.com/mqklin)<br />[🐛](https://github.com/kwelch/babel-plugin-captains-log/issues?q=author%3Amqklin "Bug reports") | | ||
| :---: | :---: | | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
@@ -164,0 +160,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15386
154