babel-plugin-transform-remove-console-enhance
v0.0.4
Published
Remove all console.* calls.
Downloads
16
Readme
babel-plugin-transform-remove-console-enhance
This plugin removes all console.*
calls.
Example
In
console.log("foo");
console.error("bar");
Out
In
console.log("foo");
console.error("bar");
Out
console.error("bar"); // set options to ignore error
Installation
npm install babel-plugin-transform-remove-console-enhance
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["transform-remove-console-enhance"]
}
or
{
"plugins": [
["transform-remove-console-enhance", {
"exclude": ["error"]
}]
]
}
options
options
can be object.
{
"exclude": ["error"]
}
Via CLI
babel --plugins transform-remove-console-enhance script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-remove-console-enhance"]
});