Captain's Log (☠️)
Usage
babel-plugin-captains-log
injects helpful details into console statements.
Current version only injects the console statments scope.
Transforms
function add(a, b) {
console.log(a, b);
return a + b;
}
const subtract = (a, b) => {
console.log(a, b);
return a - b;
};
Into
function add(a, b) {
console.log("add:", a, b);
return a + b;
}
const subtract = (a, b) => {
console.log("subtract:", a, b);
return a - b;
};
See the Roadmap for a future features and oppurtunities to contribute.
Requirements
This is a Babel plugin so it requires Babel v6 to run.
Installation
This module is distributed using npm which comes bundled with node:
npm install --save-dev babel-plugin-captains-log
To include the plugin in your project, create or open your .babelrc file at the root of your project. Then, add namespaces to your plugin list:
{
plugins: ["captains-log"]
}
Settings and options are below.
Roadmap
License
MIT
Contributors
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!