2.0.1 • Published 8 years ago

rollup-plugin-ternary v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

rollup-plugin-ternary

Unpack ternary conditional operators

Installation

npm install --save-dev rollup-plugin-ternary

Usage

import {rollup} from 'rollup';
import ternary from 'rollup-plugin-ternary';

rollup({
  entry: 'src/index.js',
  plugins: [
    ternary({
      // Restrict by extension (Default: .js)
      extensions: [ '.js', '.jsx' ],

      // Restrict with include or exclude paths (Default: all project directories)
      include: 'node_modules/**',
      exclude: 'node_modules/**',

      // Activate SourceMap (Default: true)
      sourceMap: true,

      // Transforms only extra ternary expressions (Default: true)
      extra: true
    })
  ]
});

License

Copyright (c) 2016 Nashdot, MIT License

2.0.1

8 years ago

2.0.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago