JSPM

babel-plugin-clean-code

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 197
  • Score
    100M100P100Q78659F
  • License MIT

A babel plugin to delete console[log/warn/error/info] and debugger in source code

Package Exports

  • babel-plugin-clean-code

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-clean-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

README

babel-plugin-clean-code

usage

$ npm install babel-plugin-clean-code -D

in your babel config file or babel-loader

{
  "plugins": [["babel-plugin-clean-code", options]]
}

options

default options are as below:

{
  clearConsole: true,
  consoleLevel: ["log", "error", "info", "warn"],
  clearDebugger: true,
}

ts

interface IBabelPluginCleanCode {
  clearConsole: boolean;
  clearDebugger: boolean;
  consoleLevel: ReadonlyArray<"log" | "error" | "info" | "warn">;
}

test

$ npm run test

build

$ npm run build