1.0.2 • Published 5 years ago
babel-plugin-noob v1.0.2
babel-plugin-noob
My first babel plugin.
Strip
console
,alert
, anddebugger
statements from JavaScript code
Useful for making sure you didn't leave any logging in production code.
Example
In
function hey() {
debugger
}
Out
function hey() {}
Installation
$ npm install babel-plugin-noob
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["noob"]
}
Via CLI
$ babel --plugins noob script.js
Via Node API
require('babel-core').transform('code', {
plugins: ['noob'],
})