Skip to content

timdp/rollup-plugin-strip-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-strip-logger

npm Dependencies Build Status Coverage Status JavaScript Standard Style

Strips out references to a logger package.

Warning: This is very much a work in progress. It's likely to be refactored into something more generic.

Installation

npm install --save-dev rollup-plugin-strip-logger

Usage

import stripLogger from 'rollup-plugin-strip-logger'

export default {
  entry: 'src/index.js',
  dest: 'dist/my-lib.js',
  plugins: [
    stripLogger({
      variableNames: ['logger'],
      propertyNames: ['_logger'],
      packageNames: ['my-logger']
    })
  ]
}

Options

variableNames

Remove all references to variables by the names in this array.

propertyNames

Remove all references to obj[name] for each name in this array.

packageNames

Remove all imports of packages/modules by the names in this array.

Author

Tim De Pauw

License

MIT

About

Strips out references to a logger package.

Resources

License

Stars

Watchers

Forks

Packages

No packages published