1.0.2 • Published 5 years ago

babel-plugin-noob v1.0.2

Weekly downloads
11
License
-
Repository
github
Last release
5 years ago

babel-plugin-noob

My first babel plugin.

Strip console, alert, and debugger 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'],
})