A simple transform that prepends uncommited console.log calls with a string
$ npm i --save-dev babel-plugin-console-prepend babel-cliTransforms
console.log(val); // this line has been committed
console.log(val); // this line has not been committedto
console.log(val); // this line has been committed
console.log('prefix', val); // this line has not been committed{
"plugins": ["console-prepend"],
}Set plugin options using an array of [pluginName, optionsObject].
{
"plugins": [["console-prepend", { "prefix": "I wrote this" }]],
}$ babel --plugins console-prepend script.jsrequire('babel-core').transform('code', {
'plugins': ['console-prepend'],
});